Code: Select all
Can't create missing temporary directory '/var/run/zm': Permission denied
And yes, the package has been compiled as root...
Suggestions?
Thanks!
Code: Select all
Can't create missing temporary directory '/var/run/zm': Permission denied
Code: Select all
root@lulzsec:~# dpkg -l | grep systemd
ii libsystemd-login0:amd64 44-11+deb7u4 amd64 systemd login utility library
Code: Select all
ps -o comm="" 1
knnniggett wrote:Debian/Ubuntu has all sorts of systemd-related packages and I'm not sure which is the "right" one.
You can have both systemd & sys v init packages installed at the same time too, which makes things interesting.
Note that zoneminder checks what is *running*, rather than what package is installed.
The best test for systemd running is this:INITCode: Select all
ps -o comm="" 1
If that returns "init" then you are running sys v init. To fix the /var/run/zm folder issue, you should verify your init script under /etc/init.d is creating the folder correctly. Note that, even with a properly configure init script, you can still get the missing /var/run/zm error if you try to start zoneminder the first time from the web UI. That is because the web user does not have permission to create the folder (this is by design). Always start zoneminder as a service (or as root) the first time.
SYSTEMD
If the test returns "systemd" then you should make sure you *don't* have a zoneminder init script under /etc/init.d. Instead, follow all the instructions here to properly configure zoneminder: http://www.zoneminder.com/wiki/index.ph ... se_systemd
Skip the first part for enabling systemd as you have already established it is running.
Code: Select all
#Make sure the directory for our PID folder exists or create one.
[ ! -d $pidfile ] \
&& mkdir -m 774 $pidfile \
&& chown $ZM_WEB_USER:$ZM_WEB_GROUP $pidfile
Code: Select all
#!/bin/sh
### BEGIN INIT INFO
# Provides: ZM
# Required-Start: $network mysql $local_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: <Enter a short description of the sortware>
# Description: <Enter a long description of the software>
# <...>
# <...>
### END INIT INFO
prog=ZoneMinder
ZM_PATH_BIN="/usr/local/bin"
command="$ZM_PATH_BIN/zmpkg.pl"
start() {
echo -n "Starting $prog: "
$command start
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
return $RETVAL
}
stop() {
echo -n "Stopping $prog: "
$command stop
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
}
status() {
result=`$command status`
if [ "$result" = "running" ]; then
echo "ZoneMinder is running"
RETVAL=0
else
echo "ZoneMinder is stopped"
RETVAL=1
fi
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
'status')
status
;;
*)
echo "Usage: $0 { start | stop | restart | status }"
RETVAL=1
;;
esac
exit $RETVAL
Awesome! That did the trick; thanks d00d!knnniggett wrote:Right, those Debian guys just have to be different.
Well, check out this one then:
https://github.com/ZoneMinder/ZoneMinde ... ian/init.d
Just fill in the bits that are missing from yours.