Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while :
- do
- wget -q --tries=10 --timeout=20 --spider http://google.com
- if [[ $? -eq 0 ]]; then
- echo "Online"
- if [[ "$(pidof python3.7)" == "" ]]; then
- echo "bots arent running";
- python3.7 -u /home/pi/TchernobogBOT/main.py &> /home/pi/logs/technoborg &
- python3.7 -u /home/pi/TchernobogNetworkBOT/main.py &> /home/pi/logs/network &
- python3.7 -u /home/pi/DiscordpotatoBot/main.py &> /home/pi/logs/potato &
- python3.7 -u /home/pi/ArcfallBOT/main.py &> /home/pi/logs/arcfall &
- python3.7 -u /home/pi/ArcfallLootBOT/main.py &> /home/pi/logs/arcfallLoot &
- python3.7 -u /home/pi/StreamBOT/main.py &> /home/pi/logs/stream &
- python3.7 -u /home/pi/MLORPGBOT/main.py &> /home/pi/logs/MLORPG &
- python3.7 -u /home/pi/LOOBOT/main.py &> /home/pi/logs/LOOBOT &
- python3.7 -u /home/pi/FUGATSUBOT/main.py &> /home/pi/logs/FUGATSU &
- python3.7 -u /home/pi/PROFLIGACYBOT/main.py &> /home/pi/logs/PROFLIGACY &
- else
- if [[ "$(pidof python3.7 | wc -w)" < 10 ]]; then
- FILE=/home/pi/update
- if test -f "$FILE"; then
- if [[ "$(less /home/pi/update)" == "network" ]]; then
- python3.7 -u /home/pi/TchernobogNetworkBOT/main.py &> /home/pi/logs/network &
- elif [[ "$(less /home/pi/update)" == "technoborg" ]]; then
- python3.7 -u /home/pi/TchernobogBOT/main.py &> /home/pi/logs/technoborg &
- elif [[ "$(less /home/pi/update)" == "potato" ]]; then
- python3.7 -u /home/pi/DiscordpotatoBot/main.py &> /home/pi/logs/potato &
- elif [[ "$(less /home/pi/update)" == "arcfall" ]]; then
- python3.7 -u /home/pi/ArcfallBOT/main.py &> /home/pi/logs/arcfall &
- elif [[ "$(less /home/pi/update)" == "arcfallLoot" ]]; then
- python3.7 -u /home/pi/ArcfallLootBOT/main.py &> /home/pi/logs/arcfallLoot &
- elif [[ "$(less /home/pi/update)" == "stream" ]]; then
- python3.7 -u /home/pi/StreamBOT/main.py &> /home/pi/logs/stream &
- elif [[ "$(less /home/pi/update)" == "MLORPG" ]]; then
- python3.7 -u /home/pi/MLORPG/main.py &> /home/pi/logs/MLORPG &
- elif [[ "$(less /home/pi/update)" == "LOOBOT" ]]; then
- python3.7 -u /home/pi/LOOBOT/main.py &> /home/pi/logs/LOOBOT &
- elif [[ "$(less /home/pi/update)" == "FUGATSU" ]]; then
- python3.7 -u /home/pi/FUGATSUBOT/main.py &> /home/pi/logs/FUGATSU &
- elif [[ "$(less /home/pi/update)" == "PROFLIGACY" ]]; then
- python3.7 -u /home/pi/PROFLIGACYBOT/main.py &> /home/pi/logs/PROFLIGACY &
- else
- echo "Update unknown"
- fi
- rm /home/pi/update
- else
- for pid in $(pidof python3.7); do sudo kill -9 $pid; done
- cp -r /home/pi/logs/. /home/pi/logs2/
- fi
- fi
- fi
- if [[ "$(pidof pinger)" == "" ]]; then
- /home/pi/TchernobogNetworkBOT/pinger &> /home/pi/logs/pingerlog &
- fi
- else
- echo "Offline"
- for pid in $(pidof python3.7); do sudo kill -9 $pid; done
- for pid in $(pidof pinger); do sudo kill -9 $pid; done
- fi
- sleep 30
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement