blob: c0e13b40d701c6bc095cae3e2f47f0732b0eaac9 (
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
36
37
38
39
40
41
42
43
44
|
#!/bin/bash
##
# chkconfig: 2345 75 25
# description: havege entropy daemon
#
# source function library
. /etc/rc.conf
. /etc/rc.d/functions
RETVAL=0
prog="haveged"
case "$1" in
start)
stat_busy $"Starting $prog"
/usr/sbin/$prog -w 1024 -v 1
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon $prog
stat_done
fi
;;
stop)
stat_busy $"Stopping $prog"
kill `cat /var/run/$prog.pid`
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon $prog
stat_done
rm -f /var/lock/$prog
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $prog [start|stop|restart]"
esac
|