restore_nextcloud.sh: some changes in error handling.

This commit is contained in:
Christoph 2025-03-29 03:06:33 +01:00
parent 00cce38bf1
commit 9893bd4371

View File

@ -615,7 +615,7 @@ if [[ "$DATABASE_TYPE" = 'mysql' ]]; then
if $_failed ; then
echo_failed
error "$(cat $log_file)"
error "\n\n$(cat $log_file)"
if [[ ${#_tables_not_deleted[@]} -gt 0 ]] ; then
echo ""
@ -625,9 +625,21 @@ if [[ "$DATABASE_TYPE" = 'mysql' ]]; then
done
echo ""
fi
else
echo_ok
fi
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/no]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
blank_line
else
echo_ok
fi
fi