Getting Zoneminder to start automatically

Forum for questions and support relating to the 1.28.x releases only.
Locked
swulf
Posts: 15
Joined: Tue Jun 30, 2015 4:07 am

Getting Zoneminder to start automatically

Post by swulf »

Hi,

I running Zoneminder V1.28.1 under Ubuntu Server 14.04.3 LTS. I've configured my PC to boot automatically after a power failure, and Zoneminder also starts once the system boots. However, it comes up in the 'Stopped' state which is not good. I want it to automatically enter the 'Running' state so that it will not just sit there, but will actually monitor things.

Can anyone point me to a way to do that?

Thanks.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Getting Zoneminder to start automatically

Post by asker »

swulf wrote:Hi,

I running Zoneminder V1.28.1 under Ubuntu Server 14.04.3 LTS. I've configured my PC to boot automatically after a power failure, and Zoneminder also starts once the system boots. However, it comes up in the 'Stopped' state which is not good. I want it to automatically enter the 'Running' state so that it will not just sit there, but will actually monitor things.

Can anyone point me to a way to do that?

Thanks.
Did you install using the PPA? If so
Did you add "sleep 10" just after start() in /etc/init.d/zoneminder? I use the same setup and mine starts in running state on reboot.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
swulf
Posts: 15
Joined: Tue Jun 30, 2015 4:07 am

Re: Getting Zoneminder to start automatically

Post by swulf »

Hi asker,

Yes, I did install from the PPA. I made this change per your advice and it works.

Thanks!

Code: Select all

start() {
        echo -n "Starting $prog: "
        mkdir -p $RUNDIR && chown www-data:www-data $RUNDIR
        ...
to

Code: Select all

start() {
        sleep 10
        echo -n "Starting $prog: "
        mkdir -p $RUNDIR && chown www-data:www-data $RUNDIR
        ...
bbunge
Posts: 2950
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Getting Zoneminder to start automatically

Post by bbunge »

When all else fails read the instructions...

http://www.zoneminder.com/wiki/index.ph ... e_easy_way
swulf
Posts: 15
Joined: Tue Jun 30, 2015 4:07 am

Re: Getting Zoneminder to start automatically

Post by swulf »

I was unaware of this page, thank you for pointing it out.
User avatar
iconnor
Posts: 3181
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Getting Zoneminder to start automatically

Post by iconnor »

I prefer to use monit to keep things running

ocne you get monit installed, you can use the following as a config for zm.

check process zmdc.pl with pidfile /run/zm/zm.pid
group zm
start program = "/etc/init.d/zoneminder start"
stop program = "/etc/init.d/zoneminder stop"
petec
Posts: 6
Joined: Fri May 08, 2020 8:26 pm

Re: Getting Zoneminder to start automatically

Post by petec »

hello, I know this is old post.
I have the same problem on FrreBSD, with ZM running in jail....
anybody know how to move it automatically to running state after power failure?
Locked