diff --git a/scripts/backup b/scripts/backup index 634e91f..2581570 100644 --- a/scripts/backup +++ b/scripts/backup @@ -22,21 +22,13 @@ ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= ynh_print_info --message="Declaring files to be backed up..." -#================================================= -# BACKUP THE APP MAIN DIR -#================================================= - -ynh_backup --src_path="$final_path" - #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= @@ -53,7 +45,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" # BACKUP CONFIG #================================================= -ynh_backup --src_path="$datadir" +ynh_backup --src_path="/etc/$app/" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 1d8d2ef..d1822c1 100644 --- a/scripts/install +++ b/scripts/install @@ -32,9 +32,6 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Validating installation parameters..." -final_path=/var/www/$app -test ! -e "$final_path" || ynh_die --message="This path already contains a folder" - # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url diff --git a/scripts/remove b/scripts/remove index 437632d..e9eddd7 100644 --- a/scripts/remove +++ b/scripts/remove @@ -18,8 +18,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) port=$(ynh_app_setting_get --app=$app --key=port) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # STANDARD REMOVE @@ -49,7 +47,6 @@ ynh_script_progression --message="Removing dependencies..." # Remove NodeJS dpkg --remove thelounge - ynh_remove_nodejs #================================================= @@ -68,25 +65,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE THE CONFIG FILE -#================================================= -ynh_script_progression --message="Removing the config file..." - -ynh_secure_remove --file="$datadir" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -ynh_script_progression --message="Removing the dedicated system user..." - -# Delete a system user -ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #=================================================