[systemd-devel] converting a xinetd-service to systemd
mt-ml at gmx.de
Fri Sep 9 15:16:04 PDT 2011
2011/9/8 Stefan G. Weichinger <lists at xunil.at>:
> Greets, systemd-devs and -users,
> maybe I ask a FAQ, pls be kind ...
> I am rather new to systemd and figuring out how to use it w/ gentoo
> linux. It is available within the gentoo-portage-package-system, yes.
> Compiles etc.
> But IMO it still needs some polishing there.
> Aside from the distro-specific stuff I simply wonder how to "convert" a
> xinetd-service to a systemd-service. Maybe I didn't find it, pls just
> point me at any howto ...
> In specific I look for how to convert my xinetd-service for the amanda
> backup suite and I haven't yet found an example to copy from.
> Thanks for any help with this issue,
I didn't find anything either, So I just wrote up this little
You need to create at least two unit files, amanda.socket and
amanda at .service. The socket file tells systemd which socket to create
and the service file what executable to start. Based on the xinetd
configuration file that comes with Fedora's amanda rpm they should
look like this or something similar:
ListenStream=10080 # listen for a stream (tcp) on port 10080
both on ipv4 and ipv6
Accept=yes # spawn a new instance for each
WantedBy=sockets.target # the unit is disabled by default, but can
be enabled with systemctl enable amanda.socket
amanda at .service:
ExecStart=/usr/sbin/amandad -auth=bsdtcp amdump # the binary to
start with arguments
# the user
# the default group
If you start amanda.socket, for each incoming connection systemd
spawns a service named something like
I haven't tested this and probably missed something so no guarantee at
all, but it should give you a start. For further information on what
the options do take a look at the man pages. Especially
systemd.socket, systemd.service, systemd.exec and maybe systemd.unit
should be of interest for you.
More information about the systemd-devel