updated on Thu Jan 12 12:00:22 UTC 2012
[aur-mirror.git] / freenet / rc.freenet
blob2f82f852b9d8869247e34d50ccf91f86c488e248
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Starting Freenet Daemon"
9 cd /opt/freenet && su -c "./run.sh start" freenet &> /dev/null
10 if [ $? -gt 0 ]; then
11 stat_fail
12 else
13 add_daemon freenet
14 stat_done
17 stop)
18 stat_busy "Stopping Freenet Daemon"
19 cd /opt/freenet && su -c "./run.sh stop" freenet &> /dev/null
20 if [ $? -gt 0 ]; then
21 stat_fail
22 else
23 rm_daemon freenet
24 stat_done
27 restart)
28 $0 stop
29 sleep 1
30 $0 start
33 echo "usage: $0 {start|stop|restart}"
34 esac
35 exit 0