diff --git a/scripts/upgrade b/scripts/upgrade index fd5fd62..352e0ad 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,22 +13,6 @@ source /usr/share/yunohost/helpers ynh_maintenance_mode_ON -#================================================= -# INSTALL INCUS -#================================================= -if yunohost app list --output-as json --quiet | jq -e '.apps[] | select(.id == "lxd")' >/dev/null; then - # Remove lxd_ynh - ynh_script_progression --message="Removing LXD.." - yunohost app remove lxd -fi - -ynh_script_progression --message="Installing Incus... (this make take a long time!)" - -if ! yunohost app list --output-as json --quiet | jq -e '.apps[] | select(.id == "incus")' >/dev/null; then - yunohost app install --force https://github.com/YunoHost-Apps/incus_ynh - setup_incus -fi - #================================================= # STOP SYSTEMD SERVICE #================================================= @@ -92,6 +76,22 @@ fi # Remove Pythonz ynh_secure_remove --file="$install_dir/.pythonz" +#================================================= +# INSTALL INCUS +#================================================= +if yunohost app list --output-as json --quiet | jq -e '.apps[] | select(.id == "lxd")' >/dev/null; then + # Remove lxd_ynh + ynh_script_progression --message="Removing LXD.." + yunohost app remove lxd +fi + +ynh_script_progression --message="Installing Incus... (this make take a long time!)" + +if ! yunohost app list --output-as json --quiet | jq -e '.apps[] | select(.id == "incus")' >/dev/null; then + yunohost app install --force https://github.com/YunoHost-Apps/incus_ynh + setup_incus +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================