1918b2763eadc748490c050211eac1d522e17ea7
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / haveged / S21haveged
1 #!/bin/sh
2
3 [ -x /usr/sbin/haveged ] || exit 0
4
5 case "$1" in
6         start)
7                 echo -n "Starting haveged: "
8                 start-stop-daemon -S -x /usr/sbin/haveged -- -w 1024 -r 0
9                 [ $? = 0 ] && echo "OK" || echo "FAIL"
10                 ;;
11         stop)
12                 echo -n "Stopping haveged: "
13                 start-stop-daemon -K -x /usr/sbin/haveged
14                 [ $? = 0 ] && echo "OK" || echo "FAIL"
15                 ;;
16         restart|reload)
17                 $0 stop
18                 $0 start
19                 ;;
20         *)
21                 echo "Usage: $0 {start|stop|restart}"
22                 exit 1
23 esac
24
25 exit 0