diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index 88097d5a..95e66481 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -389,6 +389,8 @@ crontab -u www-data -l | { cat; echo "*/5 * * * * php -f $NCPATH/cron.php > # Run the updatenotification on a schelude occ_command config:system:set upgrade.disable-web --value="true" +occ_command app:disable updatenotification +rm -r $NCPATH/apps/updatenotification print_text_in_color "$ICyan" "Configuring update notifications specific for this server..." download_static_script updatenotification check_command chmod +x "$SCRIPTS"/updatenotification.sh diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 53e25859..18901e81 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -309,7 +309,20 @@ fi # Update all Nextcloud apps if [ "${CURRENTVERSION%%.*}" -ge "15" ] then - occ_command app:update --all + print_text_in_color "$ICyan" "Trying to automatically update all Nextcloud apps..." + # occ command can not be used due to the check_command() function. + UPDATED_APPS="$(sudo -u www-data php $NCPATH/occ app:update --all)" +fi + +# Check which apps got updated +if [ -n "$UPDATED_APPS" ] +then + print_text_in_color "$IGreen" "$UPDATED_APPS" + notify_admin_gui \ + "You've got app updates!" \ + "$UPDATED_APPS" +else + print_text_in_color "$IGreen" "Your apps are already up to date!" fi # Nextcloud 13 is required.