blob: 9fc7d68de29e4d7bd9c897bd7d1d3968423b6ee2 (
plain)
1 #!/bin/sh
2 #
3 # /etc/rc.d/preload: start/stop tor daemon
4 #
5
6 # User settings here
7 DAEMON=preload
8
9 RETVAL=0
10
11 case $1 in
12 start)
13 echo -n "Starting $DAEMON..."
14 /usr/sbin/$DAEMON > /dev/null & RETVAL=$?
15 if [ $RETVAL = 0 ]; then
16 echo " done."
17 fi
18 ;;
19 stop)
20 echo -n "Shutting down $DAEMON..."
21 killall -s SIGKILL -q /usr/sbin/$DAEMON
22 RETVAL=$?
23 echo " done."
24 ;;
25 restart)
26 $0 stop
27 sleep 1
28 $0 start
29 RETVAL=$?
30 ;;
31 *)
32 echo "usage: $0 [start|stop|restart]"
33 exit 1
34 ;;
35 esac
36
37 exit $RETVAL
38
39 # End of file
|