diff --git a/init.d b/init.d index b43bbba..d7e632e 100755 --- a/init.d +++ b/init.d @@ -14,6 +14,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin NAME=mandaye-cam DAEMON=/usr/bin/cam_mandaye_server +PID_DIR=/var/run/mandaye-cam PIDFILE=/var/run/mandaye-cam/$NAME.pid LOG_DIR=/var/log/mandaye-cam SCRIPTNAME=/etc/init.d/$NAME @@ -38,6 +39,9 @@ cam.wsgi:application" # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME +# Create pid directory +[ ! -d $PID_DIR ] && mkdir $PID_DIR && chown $USER:$GROUP $PID_DIR + # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh