update_nextcloud.sh: reinstall notify_push if this app was installed befor.

This commit is contained in:
2025-12-04 17:13:42 +01:00
parent 3a652d14a1
commit 7efb678dfb

View File

@@ -985,14 +985,63 @@ fi
blank_line
## -----
## - (Re)install/(Re)enable some more nextcloud apps
## -----
#
#echo ""
#echo ""
#echo -e "\033[37m\033[1m(Re)install/(Re)enable some more nextcloud apps..\033[m"
#echo ""
# -----
# - (Re)install/(Re)enable some more nextcloud apps
# -----
echo ""
echo ""
echo -e "\033[37m\033[1m(Re)install/(Re)enable some more nextcloud apps..\033[m"
echo ""
if $(systemctl list-units --full -all | grep -Fq "notify_push") ; then
echononl " Install notify_push app.."
if $(
sudo -u "${HTTP_USER}" ${PHP_BIN} -f /${WEB_BASE_DIR}/htdocs/occ app:list \
| grep -q notify
) ; then
echo_skipped
else
sudo -u "${HTTP_USER}" ${PHP_BIN} -f /${WEB_BASE_DIR}/htdocs/occ app:install notify_push > $log_file 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
else
echo_failed
fatal "$(cat $log_file)"
fi
fi
echononl " Enable Nextcloud App 'notify_pushi'.."
if $(
sudo -u "${HTTP_USER}" ${PHP_BIN} -f /${WEB_BASE_DIR}/htdocs/occ app:list --enabled \
| grep -q notify
) ; then
echo_skipped
else
sudo -u "${HTTP_USER}" ${PHP_BIN} -f /${WEB_BASE_DIR}/htdocs/occ app:install > $log_file 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
else
echo_failed
fatal "$(cat $log_file)"
fi
fi
echononl " Setup Nextcloud App 'notify_pushi'.."
script -q -c "sudo -u "${HTTP_USER}" ${PHP_BIN} -f /${WEB_BASE_DIR}/htdocs/occ notify_push:setup" /dev/null <<< $'\n' \
> $log_file 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
else
echo_failed
fatal "$(cat $log_file)"
fi
fi
#
#
## - Install and enable nextcloud app 'calendar'