mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
Notify about app updates and remove update notification (#1038)
This commit is contained in:
parent
e051e3240e
commit
223ca9c88f
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user