Use icecon instead

This commit is contained in:
TheiLLeniumStudios
2023-02-06 14:28:10 +00:00
parent b38f4f06ed
commit 46ae755028
2 changed files with 14 additions and 7 deletions
+2 -2
View File
@@ -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}"
icecon --command "ensure ${resource}" "${SERVER_IP}:${SERVER_PORT}" "${RCON_PASSWORD}"
done
else
echo "Will restart the whole server"
rcon -a "${SERVER_IP}:${SERVER_PORT}" -p "${RCON_PASSWORD}" command 'txaEvent "serverShuttingDown" "{delay:5000,author:Server Owner,message:Server restarting.}"'
icecon --command 'txaEvent "serverShuttingDown" "{delay:5000,author:Server Owner,message:Server restarting.}"' "${SERVER_IP}:${SERVER_PORT}" "${RCON_PASSWORD}"
fi
else
echo "Nothing to restart"