Page 1 of 1
status check and start
Posted: Sat Oct 15, 2005 12:38 am
by jameswilson
i have had my home server change state to stopped. now im not sure if i did it and forgot etc, but can i cron a zm status start if stopped?
James
Posted: Sat Oct 15, 2005 5:52 pm
by zoneminder
I'm not sure what you mean by a 'zm status start', can you explain a bit more?
Phil
Posted: Sat Oct 15, 2005 11:59 pm
by jameswilson
ie check the status ir started or stoped
if stoped start it, so if for whatever reason its is currently stopped at say 5am it will start
James
Posted: Sun Oct 16, 2005 1:47 am
by rdmelin
This should do it, run from cron.
Code: Select all
$!/bin/bash
zmpkg.pl status |grep stopped && zmpkg.pl start
Posted: Sun Oct 16, 2005 9:01 am
by jameswilson
thanks Ross
Posted: Mon Oct 17, 2005 8:35 pm
by zoneminder
I think you can just do an unconditional start anyway, it shouldn't do any harm. Or of course a restart.
One day I'll learn the sequential shell command syntax!
Phil