From 7efb678dfbc8d935c437d5cc5bfe3e2afceaf0e0 Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 4 Dec 2025 17:13:42 +0100 Subject: [PATCH] update_nextcloud.sh: reinstall notify_push if this app was installed befor. --- update_nextcloud.sh | 65 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 57 insertions(+), 8 deletions(-) diff --git a/update_nextcloud.sh b/update_nextcloud.sh index 61be1d1..0411e85 100755 --- a/update_nextcloud.sh +++ b/update_nextcloud.sh @@ -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'