[systemd-devel] converting a xinetd-service to systemd

Mirco Tischler mt-ml at gmx.de
Wed Sep 14 13:38:12 PDT 2011


Here it is
2011/9/10 Mirco Tischler <mt-ml at gmx.de>:
> 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,
>> Stefan
> Hi Stefan
>
> I didn't find anything either, So I just wrote up this little
> (untested) example:
>
> 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:
>
> amanda.socket:
> [Socket]
> ListenStream=10080           # listen for a stream (tcp) on port 10080
> both on ipv4 and ipv6
> Accept=yes                          # spawn a new instance for each
> incoming connection
>
> [Install]
> WantedBy=sockets.target     # the unit is disabled by default, but can
> be enabled with systemctl enable amanda.socket
>
> amanda at .service:
> [Service]
> ExecStart=/usr/sbin/amandad -auth=bsdtcp amdump     # the binary to
> start with arguments
> User=amandabackup
> # the user
> Group=disk
>         # the default group
>
> If you start amanda.socket, for each incoming connection systemd
> spawns a service named something like
> amanda@<host-ip>:10080-<client-ip>:<port>.service.
> 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.
>
> Good luck
> Mirco
>


More information about the systemd-devel mailing list