From: Paweł Gołaszewski Date: Tue, 20 Apr 2004 13:14:51 +0000 (+0000) Subject: - init script for geneweb X-Git-Url: http://git.pld-linux.org/?p=packages%2Fgeneweb.git;a=commitdiff_plain;h=13e1b686df53c146525895efc4693b3432166f91 - init script for geneweb Changed files: geneweb.init -> 1.1 --- diff --git a/geneweb.init b/geneweb.init new file mode 100755 index 0000000..41072b5 --- /dev/null +++ b/geneweb.init @@ -0,0 +1,53 @@ +#!/bin/sh +# chkconfig: 345 99 01 +# +# gwd: Starts the genealogy Server +# +# Version: @(#) /etc/rc.d/init.d/gwd 1.0 +# +# description: Starts and stops the genealogy Server at boot time and shutdown. +# +# processname: gwd +# hide: true + +# Source function library. +if [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +fi + +# See how we were called. +case "$1" in + start) + if [ ! -f /var/lock/subsys/geneweb ]; then + msg_starting geneweb + daemon gwd -log /var/log/gwd.log -daemon -setup_link -bd /var/lib/geneweb -hd /usr/share/geneweb/lang + daemon gwsetup -daemon -gd /usr/share/geneweb/ 2>> /var/log/gwsetup.log + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/geneweb + else + msg_already_running geneweb + fi + ;; + stop) + if [ -f /var/lock/subsys/geneweb ]; then + msg_stopping geneweb + killproc gwd + killproc gwsetup + rm -f /var/lock/subsys/geneweb >/dev/null 2>&1 + else + msg_not_running geneweb + fi + ;; + status) + status gwd + status gwsetup + ;; + restart|reload) + $0 stop + $0 start + ;; + *) + msg_usage "$0 {start|stop|restart|reload|status}" + exit 1 +esac +