Skip to content

Commit

Permalink
Update AutoCheck.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
helldragonpz authored Feb 17, 2023
1 parent 4faea8f commit 79c1c26
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions AutoCheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,13 @@ for existing_file in "${existing_files[@]}"; do
--text "AutoCheck Service for $current_date\nPlece take a look for errors!"
done
echo "AutoCheck Service for $current_date is complete"

# Check if servers are back
nc -zw 10 $external_ip $auth_port || \
nc -zw 10 $external_ip $realm1_port || \
nc -zw 10 $external_ip $realm2_port && {
echo "Servers are down. Rebooting PC...";
timeout -t 10 reboot
}
echo "Servers are Online."
echo "Check the logfiles for missed errors."

0 comments on commit 79c1c26

Please sign in to comment.