Minor fix for run_server script.

Restart if known error happened and also update datetime to avoid overwriting log files.
This commit is contained in:
Deve 2018-09-17 22:14:32 +02:00
parent fb95e9736b
commit c2b2a57c87

View File

@ -220,6 +220,9 @@ check_servers()
if [ $(echo $FILE_END | grep -c "Session not valid. Please sign in.") -gt 0 ]; then
show_message "Error: Check server: Session not valid"
SUCCESS=0
elif [ $(echo $FILE_END | grep curl_easy_perform | grep -c "Timeout was reached") -gt 0 ]; then
show_message "Error: Check server: Timeout was reached"
SUCCESS=0
fi
done
@ -284,6 +287,8 @@ startdaemon()
if [ $SERVER_OK -eq 0 ]; then
show_message "Error: Some servers don't work, restart is needed"
stop_servers
DATETIME="$(date +%Y%m%d%H%M%S)"
init_servers
run_servers