From 89b3802e14b3aedb818ac551f90b6df55b814e34 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 11 Dec 2021 12:11:24 +0100 Subject: [PATCH] Fix --- scripts/change_url | 2 +- scripts/install | 1 - scripts/restore | 3 +-- scripts/upgrade | 8 +------- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 6820df2..11fbeac 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -109,7 +109,7 @@ fi ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="Listening on port" +ynh_systemd_action --service_name=$app --action=start --log_path="systemd" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index af0c6c8..e2b373b 100644 --- a/scripts/install +++ b/scripts/install @@ -45,7 +45,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=architecture --value=$architecture #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/restore b/scripts/restore index 06d3f63..35a28e2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -35,8 +35,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS diff --git a/scripts/upgrade b/scripts/upgrade index 9336c1c..af79ffa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) -architecture=$(ynh_app_setting_get --app=$app --key=architecture) +architecture=$YNH_ARCH #================================================= # CHECK VERSION @@ -34,12 +34,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# If architecture doesn't exist, create it -if [ -z "$architecture" ]; then - architecture=$YNH_ARCH - architecture=$(ynh_app_setting_get --app=$app --key=architecture) -fi - # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all