Files
infnoise/software/scripts/infnoise.openrc
Rune Magnussen 259267a7de OpenRC script: Fix dependencies
Wait for filesystems to be mounted. This makes sure there is a
place to write the PID-file.
Provide "trng" for other scripts to depend on.
2017-09-19 16:42:12 +02:00

23 lines
355 B
Plaintext
Executable File

#!/sbin/openrc-run
PIDFILE=/run/infnoise.pid
depend() {
need udev-settle localmount
provide trng # Support need/use trng in other scripts
}
start() {
ebegin "Starting infnoise"
/usr/local/sbin/infnoise --dev-random --daemon --pidfile $PIDFILE
eend $?
}
stop() {
ebegin "Stopping infnoise"
kill `cat $PIDFILE`
RC=$?
rm -f $PIDFILE
eend $RC
}