1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Merge pull request #360 from YunoHost-Apps/disable-mail

disable mail app to fix the upgrade from 19 to 20
This commit is contained in:
Kayou 2021-01-11 11:20:07 +01:00 committed by GitHub
commit 3eed59d4ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -244,6 +244,16 @@ then
# Print the current version number of Nextcloud
exec_occ -V
# Upgrade may fail if this app is enabled
# Take all apps enabled, and check if mail is one of them
exec_occ app:list | awk '/Enabled/{f=1;next} /Disabled/{f=0} f' | grep -q -w mail
mail_app_is_active=$?
# Temporary disable the mail app
if [ $mail_app_is_active -eq 0 ]; then
exec_occ app:disable mail
fi
# While the current version is not the last version, do an upgrade
while [ "$last_version" != "$current_version" ]
do
@ -346,6 +356,11 @@ then
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$nc_conf"
ynh_replace_string --match_string="__DATADIR__" --replace_string="$datadir" --target_file="$nc_conf"
# Reneable the mail app
if [ $mail_app_is_active -eq 0 ]; then
exec_occ app:enable mail
fi
# Ensure that UpdateNotification app is disabled
exec_occ app:disable updatenotification