Last active
January 28, 2021 09:55
-
-
Save Mte90/928104c7a3897641cb0c36719f8946fb to your computer and use it in GitHub Desktop.
Auto update Mozilla Italia bot and restart them on unix system
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
#!/usr/bin/env bash | |
cd /opt/mozita/ | |
cd ./mozitaantispam_bot/ | |
git fetch --all | |
if [[ $(git rev-list HEAD...origin/master --count) -ne 0 ]]; then | |
pkill -f antispam_mozita.py | |
git stash | |
git pull | |
nohup python3 -u ./antispam_mozita.py > cmd.log & | |
fi | |
cd ../ | |
cd ./mozitahub_bot/ | |
git fetch --all | |
if [[ $(git rev-list HEAD...origin/master --count) -ne 0 ]]; then | |
pkill -f hub_mozita.py | |
git stash | |
git pull | |
nohup python3 -u ./hub_mozita.py > cmd.log & | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment