#! /bin/sh
### BEGIN INIT INFO
-# Provides: skeleton
+# Provides: webcit
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# placed in /etc/init.d.
### END INIT INFO
-# Author: Foo Bar <foobar@baz.org>
-#
-# Please remove the "Author" lines above and replace them
-# with your own name if you copy and modify this script.
-
-# Do NOT "set -e"
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
+# Author: Wilfried Goesgens <citadel@outgesourced.org>
RUNDIR=/var/run/webcit
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
# 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
# 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 '.'