]> git.pld-linux.org Git - packages/geneweb.git/blob - geneweb.init
- tabs in preamble
[packages/geneweb.git] / geneweb.init
1 #!/bin/sh
2 # chkconfig:    345 99 01
3 #
4 # geneweb:      Starts the genealogy Server
5 #
6 # Version:      @(#) /etc/rc.d/init.d/gwd 1.0
7 #
8 # description: Starts and stops the genealogy Server at boot time and shutdown.
9 #
10 # processname: gwd
11 # hide: true
12
13 # Source function library.
14 if [ -f /etc/rc.d/init.d/functions ]; then
15         . /etc/rc.d/init.d/functions
16 fi
17
18 RETVAL=0
19 # See how we were called.
20 case "$1" in
21   start)
22         if [ ! -f /var/lock/subsys/geneweb ]; then
23                 msg_starting geneweb
24                 cd /var/lib/geneweb
25                 daemon gwd -log /var/log/gwd.log -daemon -setup_link -bd /var/lib/geneweb -hd /usr/share/geneweb/lang
26                 daemon gwsetup -daemon -gd /usr/share/geneweb/ 2>> /var/log/gwsetup.log
27                 RETVAL=$?
28                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/geneweb
29         else
30                 msg_already_running geneweb
31         fi
32         ;;
33   stop)
34         if [ -f /var/lock/subsys/geneweb ]; then
35                 msg_stopping geneweb
36                 killproc gwd
37                 killproc gwsetup
38                 rm -f /var/lock/subsys/geneweb >/dev/null 2>&1
39         else
40                 msg_not_running geneweb
41         fi
42         ;;
43   status)
44         status gwd
45         status gwsetup
46         ;;
47   restart|reload)
48         $0 stop
49         $0 start
50         ;;
51   *)
52         msg_usage "$0 {start|stop|restart|reload|status}"
53         exit 3
54 esac
55
56 exit $RETVAL
This page took 0.224028 seconds and 3 git commands to generate.