From 734cf8778f074d4f44b0487a3e4a5aed99e71ab9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 21:30:19 +0200 Subject: [PATCH] restore script cleanup --- scripts/restore | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/scripts/restore b/scripts/restore index d9035164..9696c169 100644 --- a/scripts/restore +++ b/scripts/restore @@ -14,10 +14,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -91,7 +87,7 @@ ynh_print_info "Reinstalling dependencies..." ynh_install_app_dependencies "$pkg_dependencies" #================================================= -# RESTORE THE PostgreSQL DATABASE +# RESTORE THE POSTGRESQL DATABASE #================================================= ynh_print_info "Restoring the PostgreSQL database..." @@ -99,32 +95,6 @@ ynh_psql_test_if_first_run ynh_psql_create_db "$db_name" "$db_name" "$db_pwd" ynh_psql_execute_file_as_root ./db.sql "$db_name" -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_print_info "Restoring the systemd configuration..." - -ynh_restore_file "/etc/systemd/system/$app.service" -systemctl enable "$app".service - -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -yunohost service add "$app" --log "/var/log/$app/$app.log" - -#================================================= -# RESTORE THE CRON FILE -#================================================= - -ynh_restore_file "/etc/cron.d/$app" - -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= - -ynh_restore_file "/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #=================================================