From 404679729d0ef84cba6c6c5ef7315ba4db950a4d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 23 Sep 2021 23:12:56 +0200 Subject: [PATCH] Remove service --- scripts/change_url | 3 ++- scripts/install | 6 ------ scripts/remove | 13 ------------- scripts/restore | 9 --------- scripts/upgrade | 6 ------ 5 files changed, 2 insertions(+), 35 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index c75b773..f972dd0 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -27,7 +27,8 @@ app=$YNH_APP_INSTANCE_NAME ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get $app final_path) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP diff --git a/scripts/install b/scripts/install index edfd652..5fbf042 100755 --- a/scripts/install +++ b/scripts/install @@ -115,12 +115,6 @@ ynh_secure_remove "$final_path/install.php" ynh_permission_update --permission="main" --remove="visitors" -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -yunohost service add $app --description="Fast, light, user-friendly forum software" --log="/var/log/$app/$app.log" - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/remove b/scripts/remove index 5e81f03..ad45b30 100755 --- a/scripts/remove +++ b/scripts/remove @@ -21,19 +21,6 @@ db_name=$(ynh_app_setting_get $app db_name) db_user=$db_name final_path=$(ynh_app_setting_get $app final_path) -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE SERVICE FROM ADMIN PANEL -#================================================= - -# Remove a service from the admin panel, added by `yunohost service add` -if ynh_exec_warn_less yunohost service status $app >/dev/null -then - ynh_script_progression --message="Removing $app service integration..." - yunohost service remove $app -fi - #================================================= # REMOVE THE MYSQL DATABASE #================================================= diff --git a/scripts/restore b/scripts/restore index 7186823..90e99b3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,9 +14,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -84,12 +81,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -yunohost service add $app --description="Fast, light, user-friendly forum software" --log="/var/log/$app/$app.log" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4d8372f..75d4351 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -114,12 +114,6 @@ ynh_script_progression --message="Removing install.php" --weight=1 ynh_secure_remove "$final_path/install.php" -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -yunohost service add $app --description="Fast, light, user-friendly forum software" --log="/var/log/$app/$app.log" - #================================================= # RELOAD NGINX #=================================================