]> err.no Git - scalable-opengroupware.org/blob - Scripts/sogo
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1101 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / Scripts / sogo
1 #! /bin/sh
2
3 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
4
5 DAEMON=/usr/local/sbin/sogod-0.9
6 NAME=sogo
7 DESC="Scalable OpenGroupware.Org"
8
9 PIDFILE=/var/run/sogo/sogod.pid
10
11 SOGO_ARGS=""
12
13 if [ -f /etc/default/sogo ]; then
14     . /etc/default/sogo
15 fi
16
17 test -x $DAEMON || exit 0
18
19 #set -e
20
21 case "$1" in
22   start)
23         echo -n "Starting $DESC: "
24         start-stop-daemon -c sogo --pidfile $PIDFILE \
25                 -b --start --quiet --exec $DAEMON
26         echo "$NAME."
27         ;;
28   stop)
29         echo -n "Stopping $DESC: "
30         killall sogod-0.9 2> /dev/null
31         rm -f $PIDFILE
32         echo "$NAME."
33         ;;
34   restart|force-reload)
35         echo -n "Restarting $DESC: "
36         killall sogod-0.9 2> /dev/null
37         rm -f $PIDFILE
38         sleep 1
39         start-stop-daemon -c sogo --pidfile $PIDFILE \
40                 -b --start --quiet --exec $DAEMON
41         echo "$NAME."
42         ;;
43   *)
44         N=/etc/init.d/$NAME
45         echo "Usage: $N {start|stop|restart|force-reload}" >&2
46         exit 1
47         ;;
48 esac
49
50 exit 0