Create an rsyncd.service fedora 16

T.C. Hollingsworth tchollingsworth at gmail.com
Mon Nov 28 06:57:08 UTC 2011


On Sun, Nov 27, 2011 at 8:35 PM, David Highley
<dhighley at highley-recommended.com> wrote:
> We are trying to create an rsyncd.service with fedora 16. We can get the
> process to start but it acts like it never opens the socket and exits a
> short time later. The two files we have are below.
>
> rsyncd.socket:
> [Unit]
> Description=rsyncd Service Sockets
>
> [Socket]
> ListenStream=873

rsyncd needs "Accept=yes" here.  (It's the equivalent of "nowait" in inetd.)

> [Install]
> WantedBy=sockets.target
>
> rsyncd.service:

inetd-style services need an @ at the end of the service name, which
signifies that more than one copy of the service can be started.  So
this needs to be renamed to "rsyncd at .service".

> [Unit]
> Description=rsyncd Rsync Daemon
> After=syslog.target network.target
> DefaultDependencies=no

Why are you overriding default dependencies?  It shouldn't be
necessary for this.

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

inetd-style services like rsyncd expect the socket to be connected to
standard input and output.  To accomplish that with systemd, add
"StandardInput=socket" here.  (stdout is inherited from stdin
implicitly.)

> [Install]
> Also=rsyncd.socket
> WantedBy=multi-user.target

For more information on converting inetd services to systemd units, see:
http://0pointer.de/blog/projects/inetd.html

-T.C.


More information about the users mailing list