Page 1 of 1

zm service on ubuntu 9.10

Posted: Mon Dec 14, 2009 4:35 am
by mmi
I have install from:
http://www.zoneminder.com/forums/viewto ... ght=ubuntu
and zm service on ubuntu 9.10 start on boot but not working until i restart manual the service
in 91.0 i dont have sysconfig and i think fro m here is the problem becasuse in earjier version starts well when activating zm in sysconfig

any ideea pls?
thanks

Posted: Mon Dec 14, 2009 7:24 am
by cordel
CREATE ZONEMINDER STARTUP SCRIPT
**If you don't know how to use vi then use nano instead for next stop**

vi /etc/init.d/zm

(PASTE THE FOLLOWING)

#!/bin/sh
# description: Control ZoneMinder as a Service
# chkconfig: 2345 99 99

# Source function library.
#. /etc/rc.d/init.d/functions

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

(SAVE AND EXIT)

MAKE ZM STARTUP SCRIPT EXECUTABLE
chmod 755 /etc/init.d/zm

UPDATE /etc/rc.local TO START ZONEMINDER UPON REBOOT
vi /etc/rc.local

ADD THESE LINES:
#Start Zoneminder
/etc/init.d/zm start
I'm guessing you missed one of these steps in the instructions.

Posted: Mon Dec 14, 2009 5:19 pm
by mmi
I tried several times but until I manually restart the service the source is still on the red :(

Posted: Wed Dec 23, 2009 12:29 am
by sunucu
UPDATE /etc/rc.local TO START ZONEMINDER UPON REBOOT
vi /etc/rc.local
ADD THESE LINES:
#Start Zoneminder
/etc/init.d/zm start
Yes! I've missed this step. Now working perfect.
Thanks.