Create an rsyncd.service fedora 16

David Highley dhighley at highley-recommended.com
Tue Nov 29 00:57:02 UTC 2011


"David Highley wrote:"
> 
> "T.C. Hollingsworth wrote:"

Thanks to T.C. Hollingsworth for helping us implement this service.
Steps to creating an rsyncd service that works with systemd on fedora
16.

Create configuration for rsyncd server.
- mkdir /etc/rsyncd
- touch /etc/rsyncd.motd
- touch /etc/rsyncd.secrets
- edit /etc/rsyncd.conf
pid file=/var/run/rsyncd.pid
port=873
address=<server address>
uid=root
gid=root
use chroot=yes
read only=no

# limit access to from allowed hosts only
hosts allow=<space separated host addresses>
hosts deny=*

motd file=/etc/rsyncd/rsyncd.motd

log format=%t%a%m%f%b
log file=/var/log/rsyncd.log
timeout=300

[module name]
path=
list=yes
#secrets file=/etc/rsysncd/rsyncd.secrets
comment=<module comment string>


In the directory /lib/systemd/system create two files.
- rsyncd at .service
[Unit]
Description=rsyncd Rsync Daemon
After=syslog.target network.target

[Service]
ExecStart=/usr/bin/rsync --config=/etc/rsyncd/rsyncd.conf --daemon
StandardInput=socket

- rsyncd.socket
[Unit]
Description=rsyncd Service Sockets

[Socket]
ListenStream=873
Accept=yes

[Install]
WantedBy=sockets.target

Reload systemd daemon, enable and start the service.
- systemctl --system daemon-reload
- systemctl enable rsyncd.socket
- systemctl start rsyncd.socket



More information about the users mailing list