updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / gogoc / gogocd
blob21bced5767b9265fef46c53637aa81042d26d9f2
1 #!/bin/bash
3 # A script for launch gogoCLIENT at startup on Linux systems
4 # Version: 0.0.2
5 # Author: Ivan Gasperoni <gaspe at libero dot it>
7 . /etc/rc.conf
8 . /etc/rc.d/functions
10 PID=`pidof -o %PPID gogoc`
11 case "$1" in
12 start)
13 stat_busy "Starting Freenet6 Gateway client"
14 [ -z "$PID" ] && gogoc -y -b > /dev/null 2> /dev/null
15 if [ $? -gt 0 ]; then
16 stat_fail
17 else
18 stat_done
21 stop)
22 stat_busy "Stopping Freenet6 Gateway client"
23 [ ! -z "$PID" ] && kill -HUP $PID > /dev/null 2> /dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 stat_done
30 restart)
31 $0 stop
32 sleep 10
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
37 esac
38 exit 0