get_user_consent "Do you want to stop $SERVICE_NAME and take backups?"
sudo systemctl stop "$SERVICE_NAME"|| echo_error_and_exit "Failed to stop $SERVICE_NAME."
echo"Service $SERVICE_NAME stopped."
BACKUP_COMMAND="BACKUP DATABASE [$REMOTE_DB_NAME] TO DISK = N'$REMOTE_BACKUP_PATH' WITH NOFORMAT, NOINIT, NAME = N'$REMOTE_DB_NAME-full', SKIP, NOREWIND, NOUNLOAD, STATS = 10"
echo_error_and_exit "Custom theme '$theme' looks like an unpacked JAR (contains META-INF/ or theme/). Deploy the JAR in providers/ or unpack it at the right level."
fi
cp -a "$source_theme""$staging_folder/themes/"\
|| echo_error_and_exit "Failed to copy theme '$theme'."
echo"Copied theme '$theme'."
done
if[[${#CUSTOM_THEMES[@]} -eq 0]];then
echo"No custom themes configured; using the distribution themes."
fi
# Anything present in the old providers/ but not on the allow list is a stop.
shopt -s nullglob
for existing in"$destination_folder/providers/"*;do
name="$(basename "$existing")"
known="no"
for allowed in"${CUSTOM_PROVIDERS[@]}";do
if[["$name"=="$allowed"]];then
known="yes"
fi
done
if[["$known" !="yes"]];then
echo_error_and_exit "Unknown artefact in providers/: '$name'. Add it to CUSTOM_PROVIDERS or remove it, then run again."