From 8b2957e2c7a695045ade18fc6530ac2b11e8e076 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 26 Aug 2022 08:15:48 +0200 Subject: [PATCH] Cleaning up --- scripts/change_url | 12 ----------- scripts/install | 35 ------------------------------- scripts/remove | 13 ------------ scripts/restore | 5 ----- scripts/upgrade | 51 ---------------------------------------------- 5 files changed, 116 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 7eba06d..7d347e3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -91,18 +91,6 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -# ... -#================================================= - -#================================================= -# GENERIC FINALISATION -#================================================= -# ... -#================================================= - #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/install b/scripts/install index 43f5491..5c2c8b7 100644 --- a/scripts/install +++ b/scripts/install @@ -54,24 +54,11 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# ... -#================================================= - #================================================= # INSTALL DEPENDENCIES #================================================= ynh_script_progression --message="Installing dependencies..." --weight=1 -### Those deb packages will be installed as dependencies of this package. -### If you're not using this helper: -### - Remove the section "REMOVE DEPENDENCIES" in the remove script -### - Remove the variable "pkg_dependencies" in _common.sh -### - As well as the section "REINSTALL DEPENDENCIES" in the restore script -### - And the section "UPGRADE DEPENDENCIES" in the upgrade script - ynh_install_app_dependencies $pkg_dependencies #================================================= @@ -111,28 +98,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config -#================================================= -# SPECIFIC SETUP -#================================================= -# ... -#================================================= - -#================================================= -# ADD A CONFIGURATION -#================================================= -#ynh_script_progression --message="Adding a configuration file..." --weight=1 - -#ynh_add_config --template="some_config_file" --destination="$final_path/some_config_file" - -#chmod 400 "$final_path/some_config_file" -#chown $app:$app "$final_path/some_config_file" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# ... -#================================================= - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/remove b/scripts/remove index abc28db..3dedba8 100644 --- a/scripts/remove +++ b/scripts/remove @@ -19,12 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -#================================================= -# STANDARD REMOVE -#================================================= -# ... -#================================================= - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -63,13 +57,6 @@ ynh_script_progression --message="Removing dependencies..." --weight=1 # Remove metapackage and its dependencies ynh_remove_app_dependencies -#================================================= -# SPECIFIC REMOVE -#================================================= -# ... -#================================================= - - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 27f9724..813cb0f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -85,11 +85,6 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies -#================================================= -# RESTORE VARIOUS FILES -#================================================= -#ynh_script_progression --message="Restoring various files..." --weight=1 - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e21ca0f..af7a987 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,35 +47,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# ... -#================================================= - -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# -# N.B. : the followings setting migrations snippets are provided as *EXAMPLES* -# of what you may want to do in some cases (e.g. a setting was not defined on -# some legacy installs and you therefore want to initiaze stuff during upgrade) -# - -# If db_name doesn't exist, create it -#if [ -z "$db_name" ]; then -# db_name=$(ynh_sanitize_dbid --db_name=$app) -# ynh_app_setting_set --app=$app --key=db_name --value=$db_name -#fi - -# If final_path doesn't exist, create it -#if [ -z "$final_path" ]; then -# final_path=/var/www/$app -# ynh_app_setting_set --app=$app --key=final_path --value=$final_path -#fi - #================================================= # CREATE DEDICATED USER #================================================= @@ -123,28 +94,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config -#================================================= -# SPECIFIC UPGRADE -#================================================= -# ... -#================================================= - -#================================================= -# UPDATE A CONFIG FILE -#================================================= -#ynh_script_progression --message="Updating a configuration file..." --weight=1 - -#ynh_add_config --template="some_config_file" --destination="$final_path/some_config_file" - -#chmod 400 "$final_path/some_config_file" -#chown $app:$app "$final_path/some_config_file" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# ... -#================================================= - #================================================= # RELOAD NGINX #=================================================