Created
July 27, 2020 22:23
-
-
Save nshores/4049212f9b78c3288983d1b27aacc48a to your computer and use it in GitHub Desktop.
check_patio_monitor.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if pgrep -f "python3 patio_light_notify.py"; then | |
pid=$(pidof python3 patio_light_notify.py) | |
echo "pid of patio_light_notify:" $pid | |
echo "it is already running" | |
exit | |
else | |
echo "starting patio notify script" | |
cd /home/zoneminder/ | |
python3 patio_light_notify.py & | |
pid=$(pidof python3 patio_light_notify.py) | |
echo "pid of patio_light_notify:" $pid | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment