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