From: Anthony Minessale Date: Thu, 13 Dec 2012 16:09:25 +0000 (-0600) Subject: FS-4931 --resolve ok, the binary also tries to make the dir but its probably failing... X-Git-Tag: v1.3.10~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab886cad308592163caf9b15ba60e4f07e0395d6;p=thirdparty%2Ffreeswitch.git FS-4931 --resolve ok, the binary also tries to make the dir but its probably failing from dropped perms. probably if the freeswitch user had write perms in /var/run it would also work --- diff --git a/debian/freeswitch-sysvinit.freeswitch.init b/debian/freeswitch-sysvinit.freeswitch.init index 2b48cfd852..5f8b028bcc 100644 --- a/debian/freeswitch-sysvinit.freeswitch.init +++ b/debian/freeswitch-sysvinit.freeswitch.init @@ -18,7 +18,9 @@ NAME=freeswitch DAEMON=/usr/bin/freeswitch DAEMON_ARGS="-u freeswitch -g freeswitch -rp -nc -nonat" USER=freeswitch -PIDFILE=/var/run/$NAME/$NAME.pid +GROUP=freeswitch +RUNDIR=/var/run/$NAME +PIDFILE=$RUNDIR/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME WORKDIR=/var/lib/$NAME @@ -28,6 +30,11 @@ WORKDIR=/var/lib/$NAME . /lib/lsb/init-functions do_start() { + # Directory in /var/run may disappear on reboot (e.g. when tmpfs used for /var/run). + mkdir -p $RUNDIR + chown -R $USER:$GROUP $RUNDIR + chmod -R ug=rwX,o= $RUNDIR + start-stop-daemon --start --quiet \ --pidfile $PIDFILE --exec $DAEMON --name $NAME --user $USER \ --test > /dev/null \