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
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)
Please don't post multiple posts in succession. Use the "Quick Edit" or "Modify" menu item in the bottom right corner of your post instead.
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 (https://linux.die.net/man/8/in.tftpd) states that replacing
-l with
-L will fix that. Remember to kill any dangling
in.tftpd processes that might be using the port.
Works. Thank you!!!