|
@@ -36,7 +36,8 @@ NAME=ngircd
|
|
|
DESC="Next generation IRC daemon"
|
|
|
LOGDIR=/var/log/
|
|
|
|
|
|
-PIDFILE=/var/run/ngircd/$NAME.pid
|
|
|
+PIDDIR=/var/run/ngircd
|
|
|
+PIDFILE=$PIDDIR/$NAME.pid
|
|
|
|
|
|
test -x $DAEMON || exit 0
|
|
|
|
|
@@ -154,6 +155,13 @@ case "$1" in
|
|
|
log_end_msg 0
|
|
|
exit 0
|
|
|
fi
|
|
|
+ # If $PIDDIR doesn't exist, create it and give it proper permissions
|
|
|
+ # Useful if $PIDDIR is in a tmpfs
|
|
|
+ if [ ! -d "$PIDDIR" ]; then
|
|
|
+ mkdir $PIDDIR
|
|
|
+ chown irc:irc $PIDDIR
|
|
|
+ chmod 770 $PIDDIR
|
|
|
+ fi
|
|
|
if start_server ; then
|
|
|
# NOTE: Some servers might die some time after they start,
|
|
|
# this code will detect this issue if STARTTIME is set
|