blob: 45d662d24ad1d29de6de5b63b9bd3b83d3ec949c (
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
|
#!/bin/sh
#
# /etc/rc.d/yggdrasil: start/stop yggdrasil daemon
# Shokara: modified tor's service file
#
# User settings here
DAEMON=yggdrasil
CONFFILE=/etc/yggdrasil.conf
[ -e $CONFFILE ] || yggdrasil -genconf >$CONFFILE
RETVAL=0
case $1 in
start)
echo -n "Starting $DAEMON..."
/usr/bin/$DAEMON -useconffile $CONFFILE > /dev/null & RETVAL=$?
if [ $RETVAL = 0 ]; then
echo " done."
fi
;;
stop)
echo -n "Shutting down $DAEMON..."
killall -q /usr/bin/$DAEMON
RETVAL=$?
echo " done."
;;
restart)
$0 stop
sleep 5
$0 start
RETVAL=$?
;;
*)
echo "usage: $0 [start|stop|restart]"
exit 1
;;
esac
exit $RETVAL
# End of file
|