diff --git a/scripts/remove b/scripts/remove index 0fd50e3..c08db99 100644 --- a/scripts/remove +++ b/scripts/remove @@ -9,39 +9,22 @@ source _common.sh source /usr/share/yunohost/helpers -#======================================= -# STANDARD REMOVE #================================================= -# REMOVE LOGROTATE CONFIGURATION +# REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 +# REMOVE SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=1 - # Remove the log files ynh_secure_remove --file="/var/log/$app" diff --git a/scripts/restore b/scripts/restore index 880186e..27a36b0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,11 +27,6 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 484a7c0..0249aac 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,7 @@ upgrade_type=$(ynh_check_app_version_changed) ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If secret_key doesn't exist, create it -if [ -z "$secret_key" ]; then +if [ -z "${secret_key:-}" ]; then secret_key="$(grep "^secret_key" "$install_dir/config/ampache.cfg.php" | cut -d'"' -f2)" ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key fi