1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yunorunner_ynh.git synced 2024-09-03 20:36:13 +02:00

Reorganize upgrade steps for old upgrades

This commit is contained in:
Salamandar 2024-03-15 20:03:46 +01:00
parent 9f597ef3a5
commit 3d05c0cf62

View file

@ -13,22 +13,6 @@ source /usr/share/yunohost/helpers
ynh_maintenance_mode_ON 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 # STOP SYSTEMD SERVICE
#================================================= #=================================================
@ -92,6 +76,22 @@ fi
# Remove Pythonz # Remove Pythonz
ynh_secure_remove --file="$install_dir/.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 # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================