1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/domoticz_ynh.git synced 2024-09-03 18:26:17 +02:00

convert v2

This commit is contained in:
Krakinou 2023-02-28 23:36:30 +01:00
parent ffc8dab4a4
commit 4d27c23344
4 changed files with 14 additions and 10 deletions

View file

@ -54,7 +54,6 @@ ram.runtime = "50M"
[resources.system_user]
[resources.install_dir]
dir = /opt/yunohost/__APP__
[resources.permissions]
main.url = "/"

View file

@ -13,8 +13,8 @@ source /usr/share/yunohost/helpers
#Have to reload them as otherwise they are all the same
backup_OS=$(ynh_app_setting_get --app="$app" --key=OS)
backup_mach=$(ynh_app_setting_get --app="$app" --key=mach)
os=`lowercase \`uname -s\``
mach=`uname -m`
current_os=`lowercase \`uname -s\``
current_mach=`uname -m`
#=================================================
# CHECK IF THE APP CAN BE RESTORED
@ -22,10 +22,10 @@ mach=`uname -m`
#As we are downloading compiled binaries for each system, we have to check if the restore occurs
#on the same system type. If we are restoring on another system type it won't work and in that
#case we must go through a reinstall process.
test "$backup_OS" = "$os" \
|| ynh_die --message="Cannot restore : previous OS is $backup_OS, current OS is $OS, please reinstall"
test "$backup_mach" = "$mach" \
|| ynh_die --message="Cannot restore : previous machine type is $backup_mach, current machine type is $MACH, please reinstall"
test "$backup_OS" = "$current_os" \
|| ynh_die --message="Cannot restore : previous OS is $backup_OS, current OS is $current_os, please reinstall"
test "$backup_mach" = "$current_mach" \
|| ynh_die --message="Cannot restore : previous machine type is $backup_mach, current machine type is $current_mach, please reinstall"
#=================================================
# STANDARD RESTORATION STEPS

View file

@ -13,8 +13,8 @@ version_gt() {
source _common.sh
source /usr/share/yunohost/helpers
#REMOVEME? current_OS=$(ynh_app_setting_get --app="$app" --key=OS)
#REMOVEME? current_mach=$(ynh_app_setting_get --app="$app" --key=mach)
current_OS=$(ynh_app_setting_get --app="$app" --key=OS)
current_mach=$(ynh_app_setting_get --app="$app" --key=mach)
#=================================================
# CHECK VERSION

View file

@ -19,6 +19,8 @@ test_format = 1.0
args.mqtt_domain="mqtt.domain.tld"
exclude = ["package_linter"]
test_upgrade_from.27311ad.name = "2022.2 with mosquitto"
test_upgrade_from.27311ad.args.mqtt_domain="mqtt.domain.tld"
@ -33,6 +35,9 @@ test_format = 1.0
set -euxo pipefail
yunohost app setting domoticz mqtt_domain -v mqtt.domain.tld
"""
exclude = ["install.private", "install.multi", "backup", "change_url"]
args.mqtt_domain="mqtt.domain.tld"
exclude = ["package_linter", "install.private", "install.multi", "backup_restore", "change_url"]
test_upgrade_from.27311ad.name = "2022.2 without mosquitto"
test_upgrade_from.27311ad.args.mqtt_domain="sub.domain.tld"