From 4b950a3f6090d45e3198485c6d5a7bd73e1d4d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 19 Dec 2023 08:48:17 +0100 Subject: [PATCH] fix restoration --- scripts/restore | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/restore b/scripts/restore index 11ccb16..b3b4aac 100755 --- a/scripts/restore +++ b/scripts/restore @@ -13,30 +13,26 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=1 +ynh_script_progression --message="Restoring files..." --weight=10 -ynh_restore_file --origin_path="$install_dir" -set_permissions +ynh_restore #================================================= # RESTORE THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=1 +ynh_script_progression --message="Restoring the database..." --weight=1 ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +mkdir -p /var/log/"$app" +set_permissions -ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet - yunohost service add $app --description=XWiki --log="/var/log/$app/$app.log" ynh_use_logrotate --logfile "/var/log/$app"