diff --git a/entrypoint.sh b/entrypoint.sh index 0dfe17b..ae233d8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -78,11 +78,11 @@ if ! is_array_empty "$resources_to_restart"; then echo "Will restart individual resources" for resource in $resources_to_restart; do echo "Restarting ${resource}" - rcon -a ${SERVER_IP}:${SERVER_PORT} -p ${RCON_PASSWORD} command "ensure ${resource}" + rcon -a "${SERVER_IP}:${SERVER_PORT}" -p "${RCON_PASSWORD}" command "ensure ${resource}" done else echo "Will restart the whole server" - rcon -a ${SERVER_IP}:${SERVER_PORT} -p ${RCON_PASSWORD} command 'quit "Restarting server"' + rcon -a "${SERVER_IP}:${SERVER_PORT}" -p "${RCON_PASSWORD}" command 'txaEvent "serverShuttingDown" "{"delay":5000,"author":Server Owner,"message":"Server restarting."}"' fi else echo "Nothing to restart"