| 1 | [Unit] |
| 2 | Description=fast remote file copy program daemon |
| 3 | ConditionPathExists=/etc/rsyncd.conf |
| 4 | After=network.target |
| 5 | Documentation=man:rsync(1) man:rsyncd.conf(5) |
| 6 | |
| 7 | [Service] |
| 8 | ExecStart=/usr/bin/rsync --daemon --no-detach |
| 9 | RestartSec=1 |
| 10 | Restart=on-failure |
| 11 | |
| 12 | # Citing README.md: |
| 13 | # |
| 14 | # [...] Using ssh is recommended for its security features. |
| 15 | # |
| 16 | # Alternatively, rsync can run in `daemon' mode, listening on a socket. |
| 17 | # This is generally used for public file distribution, [...] |
| 18 | # |
| 19 | # So let's assume some extra security is more than welcome here. We do full |
| 20 | # system protection (which makes /usr, /boot, & /etc read-only) and hide |
| 21 | # devices. To override these defaults, it's best to do so in the drop-in |
| 22 | # directory, often done via `systemctl edit rsync.service`. The file needs |
| 23 | # just the bare minimum of the right [heading] and override values. |
| 24 | # See systemd.unit(5) and search for "drop-in" for full details. |
| 25 | |
| 26 | ProtectSystem=full |
| 27 | #ProtectHome=on|off|read-only |
| 28 | PrivateDevices=on |
| 29 | NoNewPrivileges=on |
| 30 | |
| 31 | [Install] |
| 32 | WantedBy=multi-user.target |