From 1788092dd38ac9a83b9f4a4848972527f00b7bae Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 18 Oct 2020 13:08:39 +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 7816a33..b63d6b4 100755 --- a/scripts/install +++ b/scripts/install @@ -50,6 +50,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 c4e556c..e2139fa 100755 --- a/scripts/restore +++ b/scripts/restore @@ -42,6 +42,10 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= ynh_script_progression --message="Validating restoration parameters..." +if [ "$(lsb_release --codename --short)" != "buster" ]; then + ynh_die --message="Sorry, but this app can only be installed 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 f3b3455..6d3465e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,6 +46,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 installed 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