Skip to main content
Topic: tftp-hpa. convert systemd into runit  (Read 817 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

tftp-hpa. convert systemd into runit

Hello. I want use tftp-hpa from arch. But it use systemd units. Can anyone help me convert systemd utits into runit?

tftpd.service:

[Unit]
Description=hpa's original TFTP daemon
After=network.target

tftpd.socket:

[Service]
Type=forking
EnvironmentFile=/etc/conf.d/tftpd
ExecStart=/usr/bin/in.tftpd --listen $TFTPD_ARGS

[Install]
WantedBy=multi-user.target


[Unit]
Description=hpa's original TFTP daemon
Conflicts=tftpd.service

[Socket]
ListenDatagram=69

[Install]
WantedBy=sockets.target


Re: tftp-hpa. convert systemd into runit

Reply #1
I try create runit file:

#!/bin/sh
exec in.tftpd -l -s /srv/tftp/

in.tftpd not  run. RSM shows that the service is not running...   tftp-hpa  state-down.
But in.tftpd -l -s /srv/tftp/ runs from command line (root)


Re: tftp-hpa. convert systemd into runit

Reply #3
Quote
Type=forking

There's the problem. Due to runit's design, you must find a way to make services foreground/non-forking (in systemd lingo, Type=simple) for them to work properly.

You should probably read the documentation on your end to be sure, but this manual states that replacing -l with -L will fix that. Remember to kill any dangling in.tftpd processes that might be using the port.

Re: tftp-hpa. convert systemd into runit

Reply #4
Works. Thank you!!!