Bash script to change the run state and to check it at every boot

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
Mentor.37
Posts: 7
Joined: Wed Oct 25, 2017 6:15 pm

Bash script to change the run state and to check it at every boot

Post by Mentor.37 »

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.
Mentor.37
Posts: 7
Joined: Wed Oct 25, 2017 6:15 pm

Re: Bash script to change the run state and to check it at every boot

Post by Mentor.37 »

If can interest, here a more update script that can also arm zoneminder if a bluetooth device isn't more detected.
Post Reply