Running hidentd with ucspi-tcp and daemontools
Ucspi-tcp/daemontools is a recommended way of running hidentd. To create a daemontools service for hidentd:
- Create user hidentd belonging to group hidentd. Create user hidlog belonging to group hidlog.
- Create /etc/hidentd and /etc/hidentd/log
- Put this into /etc/hidentd/run:
#!/bin/bash HIUID=`id -u hidentd` HIGID=`id -g hidentd` exec /usr/local/bin/tcpserver -R -H -l 0 -u $HIUID -g $HIGID 0 auth /usr/local/sbin/hidentd -s 2>&1
On FreeBSD, hidentd has to be run as root:#!/bin/bash exec /usr/local/bin/tcpserver -R -H -l 0 0 auth /usr/local/sbin/hidentd -s 2>&1
- Create /var/log/hidentd, owned by hidlog.hidlog
- Put this into /etc/hidentd/log/run:
#!/bin/bash exec setuidgid hidlog multilog t /var/log/hidentd
- Link /etc/hidentd to /service.
After 5 seconds hidentd should be up and running.