This commit is contained in:
2023-11-26 00:57:48 -06:00
parent a2cb09a706
commit 89dc477d56

View File

@@ -245,12 +245,9 @@ EOF
# start the server
cmd.exe /C temp.bat
rm -f temp.bat modstring 2>/dev/null ||:
echo '===================================='
printf '%s - Server started.\n' "$(date)"
echo '===================================='
printf '\n**** Sleeping for: %s *****\n\n' "$RESTART_INTERVAL"
msg '%s - Server started.\n' "$(date)"
count=0
while [ "$count" -lt "$RESTART_INTERVAL" ] ; do
@@ -261,10 +258,7 @@ EOF
echo "==========================="
msg "Time up - Killing server"
# TODO: need to change this to be title of the cmd else it will kill all servers
cmd.exe /C taskkill /IM /FI "$PROCESS_NAME"
###### cmd.exe /C taskkill /im DayZServer_x64.exe /F
rm -f temp.bat modstring 2>/dev/null ||:
cmd.exe /C taskkill /FI "WINDOWTITLE eq $PROCESS_NAME"
msg "Sleeping 10 seconds to settle"
sleep 10