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
done
shopt -s nullglob
for existing in"$destination_folder/providers/"*.jar;do
name="$(basename "$existing")"
known="no"
for allowed in"${CUSTOM_PROVIDERS[@]}";do
if[["$name"=="$allowed"]];then
known="yes"
fi
done
if[["$known" !="yes"]];then
shopt -u nullglob
echo_error_and_exit "Unknown artefact in providers/: '$name'. Add it to CUSTOM_PROVIDERS or remove it, then run again."
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."
service_stopped="yes"
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"