* buildpackages can create deb source tarballs now.
[citadel.git] / webcit / debian / webcit.init
index c963a30c8df8261a1cc067312264a02102714e63..c8a8726217d9fc69fcb50646acb18dbd19d8fe0d 100644 (file)
@@ -23,7 +23,6 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC="Citadel Groupware Webserver "
 NAME=webserver
 DAEMON=/usr/sbin/$NAME
-CTDLSVC=/usr/lib/citadel-webcit/ctdlsvc
 DAEMON_ARGS=""
 PIDFILE=$RUNDIR/$NAME.pid
 SCRIPTNAME=/etc/init.d/webcit
@@ -90,8 +89,8 @@ do_start()
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
-       if $CTDLSVC $PIDFILE.$1 $DAEMON \
-               -p$@ -t$LOGDIR/access.${1}.log ; then
+       if $DAEMON -d$PIDFILE.$1 \
+           -p$@ -t$LOGDIR/access.${1}.log ; then
            return 0
        else
            return 2
@@ -112,10 +111,10 @@ do_stop()
        #   2 if daemon could not be stopped
        #   other if a failure occurred
 
-        for i in   $PIDFILE.*; do
+        for i in $PIDFILE.*; do if test -f $i; then
            kill `cat $i`
            rm -f $i
-       done
+       fi; done
 
        #while test -d /proc/`cat $PIDFILE`; do
        #    /usr/bin/printf  '.'