Created
October 24, 2023 15:00
-
-
Save jokereven/53b16562ecccc567228a764ce3b609bf to your computer and use it in GitHub Desktop.
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/bash | |
while true | |
do | |
monitor=`ps -ef | grep gmgn.py | grep -v grep | wc -l` | |
if [ $monitor -eq 0 ] | |
then | |
echo "Program is not running, restart gmgn.py" | |
python gmgn.py | |
else | |
echo "Program is running" | |
fi | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment