From de9125095ba2f9d109272a752a8c4276821404ce Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 18 Oct 2020 19:42:49 +0200 Subject: [PATCH] Limit to buster --- scripts/install | 4 ++++ scripts/restore | 4 ++++ scripts/upgrade | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/scripts/install b/scripts/install index 37150ab..b85e3e1 100644 --- a/scripts/install +++ b/scripts/install @@ -40,6 +40,10 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Validating installation parameters..." +if [ "$(lsb_release --codename --short)" != "buster" ]; then + ynh_die --message="Sorry, but this app can only be installed on Buster :(" +fi + final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" diff --git a/scripts/restore b/scripts/restore index 285aaa5..6044dd3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,6 +39,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." +if [ "$(lsb_release --codename --short)" != "buster" ]; then + ynh_die --message="Sorry, but this app can only be restored on Buster :(" +fi + ynh_webpath_available --domain=$domain --path_url=$path_url \ || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ diff --git a/scripts/upgrade b/scripts/upgrade index f6dc919..0b1ccfd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,6 +38,10 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." +if [ "$(lsb_release --codename --short)" != "buster" ]; then + ynh_die --message="Sorry, but this app can only be upgraded on Buster :(" +fi + # Fix is_public as a boolean value if [ "$is_public" = "Yes" ]; then ynh_app_setting_set --app=$app --key=is_public --value=1