update_nextcloud.sh: some changes in script output.

This commit is contained in:
Christoph 2024-03-31 03:01:42 +02:00
parent a9fb3067df
commit ab1256f14b

View File

@ -944,12 +944,26 @@ blank_line
# - Update Nextcloud
# -
echo ""
echo " Update Nextcloud"
echo -e " Update Nextcloud\n"
su -c"${PHP_BIN} ${WEB_BASE_DIR}/htdocs/occ upgrade" -s /bin/bash $HTTP_USER
echo ""
if [[ $? -eq 0 ]]; then
info "Updating nextcloud core was successfully.."
else
fatal "$(cat $log_file)"
error "Updating nextcloud core failed!"
echo -e " Command was:"
echo -e " \033[33msu -c\"${PHP_BIN} ${WEB_BASE_DIR}/htdocs/occ upgrade\" -s /bin/bash $HTTP_USER\033[m"
echo ""
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 "Interrupted by user."
fi
# Set maintenace mode to 'off'.. !!