File: infnoise.init

package info (click to toggle)
infnoise 0.3.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 27,304 kB
  • sloc: ansic: 2,177; sh: 251; python: 146; makefile: 65
file content (50 lines) | stat: -rwxr-xr-x 1,050 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

### BEGIN INIT INFO
# Provides:          infnoise
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Wayward Geek InfNoise TRNG driver
# Description:       The InfNoise TRNG is a hardware random-number generator;
#                    this service integrates its output with the Linux entropy
#                    pool.
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/infnoise
NAME=infnoise
DESC="InfNoise TRNG"

test -x $DAEMON || exit 0

. /lib/lsb/init-functions

set -e

case "$1" in
	status)
		status_of_proc $DAEMON $NAME
		;;

	start)
		start-stop-daemon --start --pidfile /var/run/infnoise.pid --oknodo --startas $DAEMON -- --dev-random --daemon --pidfile /var/run/infnoise.pid
		;;

	stop)
		start-stop-daemon --stop --pidfile /var/run/infnoise.pid --oknodo
		;;

	restart|force-reload)
		$0 stop
		$0 start
		;;

	*)
		echo "Usage: $0 {start|stop|restart|force-reload}" >&2
		exit 1
		;;
esac

exit 0