Created
July 17, 2023 06:44
-
-
Save asilbalaban/f4a72543e3f450d895c0e51aeb17e865 to your computer and use it in GitHub Desktop.
run python script if not running
This file contains hidden or 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 | |
if ps aux | grep script.py | grep -v grep > /dev/null | |
then | |
echo "The script is running." | |
else | |
echo "The script is not running." | |
/usr/bin/python3 ~/teklif-botu/script.py | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment