blob: 98b8857e7781160fea856f219c22b0bc8e97cee0 (
plain)
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
|
#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin
pidfile=/var/run/haveged.pid
# source function library
. /etc/init.d/functions
case "$1" in
start)
echo -n "Starting havege entropy daemon... "
start-stop-daemon --start --quiet --pidfile $pidfile --name haveged --startas haveged -- -w 1024 -v 0 && success || failure
echo
;;
stop)
echo -n "Stopping havege entropy daemon... "
start-stop-daemon --stop --quiet --pidfile $pidfile --name haveged
success
echo
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
status haveged
;;
*)
echo "Usage: /etc/init.d/haveged {start|stop|restart|status}"
exit 1
esac
exit 0
|