This commit is contained in:
TheiLLeniumStudios
2023-02-06 12:00:28 +00:00
parent 492fddef88
commit c2d3b2542c
+4 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh -l #!/bin/sh -l
beginswith() { case $2 in "$1"*) true;; *) false;; esac; } beginswith() { case $2 in "$1"*) true ;; *) false ;; esac }
exists_in_array() { exists_in_array() {
local element="$1" local element="$1"
@@ -61,6 +61,7 @@ echo "${DIFF}" | while read -r changed; do
done done
if ! is_array_empty "$resources_to_restart"; then if ! is_array_empty "$resources_to_restart"; then
echo "Array is not empty."
if [ "$RESTART_INDIVIDUAL_RESOURCES" = true ]; then if [ "$RESTART_INDIVIDUAL_RESOURCES" = true ]; then
echo "Will restart individual resources" echo "Will restart individual resources"
for resource in $resources_to_restart; do for resource in $resources_to_restart; do
@@ -71,4 +72,6 @@ if ! is_array_empty "$resources_to_restart"; then
echo "Will restart the whole server" 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 'quit "Restarting server"'
fi fi
else
echo "Array is empty."
fi fi