mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
send notification for Nextcloud and app updates
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
3e59616b5d
commit
130ca73dd2
1 changed files with 7 additions and 1 deletions
|
|
@ -211,9 +211,12 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then
|
||||||
echo "Upgrading nextcloud from $installed_version to $image_version..."
|
echo "Upgrading nextcloud from $installed_version to $image_version..."
|
||||||
if ! php /var/www/html/occ upgrade || ! php /var/www/html/occ -V; then
|
if ! php /var/www/html/occ upgrade || ! php /var/www/html/occ -V; then
|
||||||
echo "Upgrade failed. Please restore from backup."
|
echo "Upgrade failed. Please restore from backup."
|
||||||
|
bash /notify.sh "Nextcloud update to $image_version failed!" "Please restore from backup!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
bash /notify.sh "Nextcloud update to $image_version successful!" "Feel free to inspect the Nextcloud container logs for more info."
|
||||||
|
|
||||||
php /var/www/html/occ app:list | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after
|
php /var/www/html/occ app:list | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after
|
||||||
echo "The following apps have been disabled:"
|
echo "The following apps have been disabled:"
|
||||||
diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1
|
diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1
|
||||||
|
|
@ -233,7 +236,10 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then
|
||||||
|
|
||||||
# Performing update of all apps if daily backups are enabled, running and successful
|
# Performing update of all apps if daily backups are enabled, running and successful
|
||||||
if [ "$DAILY_BACKUP_RUNNING" = 'yes' ]; then
|
if [ "$DAILY_BACKUP_RUNNING" = 'yes' ]; then
|
||||||
php /var/www/html/occ app:update --all
|
UPDATED_APPS="$(php /var/www/html/occ app:update --all)"
|
||||||
|
if [ -n "$UPDATED_APPS" ]; then
|
||||||
|
bash /notify.sh "Your apps just got updated!" "$UPDATED_APPS"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue