# placed in /etc/init.d.
### END INIT INFO
+# uncomment this to create coredumps as described in
+# http://www.citadel.org/doku.php/faq:mastering_your_os:gdb#how.do.i.make.my.system.produce.core-files
+# ulimit -c unlimited
+
# Author: Wilfried Goesgens <citadel@outgesourced.org>
RUNDIR=/var/run/webcit
PATH=/sbin:/usr/sbin:/bin:/usr/bin
SCRIPTNAME=/etc/init.d/webcit
SENDCOMMAND=/usr/sbin/sendcommand
DEFAULT=/etc/default/webcit
-LOGDIR=/var/log/webcit/
-
+DROP_TO_UID=`id -u nobody`
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
mkdir -p $RUNDIR
fi
- if test ! -d $LOGDIR; then
- mkdir -p $LOGDIR
- fi
-
# are we disabled?
if test "$1" -lt "0"; then
return 0
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
- if $DAEMON -D$PIDFILE.$1 \
- -p$@ -t$LOGDIR/access.${1}.log $4; then
+ if $DAEMON -u $DROP_TO_UID -D$PIDFILE.$1 \
+ -p$@ $4; then
return 0
else
return 2