Here a simple bash script to change the run state.
Use case example:
We have three state, Day, Night and Armed. The Day state is from 8 to 24. The Night state is from 24 to 8.
We can set via cron to switch from Day to Night and vice-versa, except for the case if the current state is Armed.
We can set via cron to check at every boot if the current state is correct comparing the current hour and in case the state is wrong we can set the right state.
Bash script to change the run state and to check it at every boot
Re: Bash script to change the run state and to check it at every boot
If can interest, here a more update script that can also arm zoneminder if a bluetooth device isn't more detected.