zm service on ubuntu 9.10

Forum for questions and support relating to the 1.24.x releases only.
Locked
User avatar
mmi
Posts: 111
Joined: Wed Jun 27, 2007 12:54 am

zm service on ubuntu 9.10

Post 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
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
User avatar
mmi
Posts: 111
Joined: Wed Jun 27, 2007 12:54 am

Post by mmi »

I tried several times but until I manually restart the service the source is still on the red :(
sunucu
Posts: 13
Joined: Fri May 02, 2008 11:02 am

Post 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.
OSVER: Ubuntu Server 9.10 Karmic
ZMVER: ZoneMinder 1.24.2
DEVICE: Conexant CX23881 (4 Channel) with 2 CCD cams.
VIDEO: GeForce 9400GT 1GB (non-shared)
RAM: 1GB DDR2
CPU: Intel Pentium Dual 2.00GHz
Locked