diff --git a/scripts/restore b/scripts/restore index fdc132a..83cb4dc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -15,6 +15,9 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Restoring the app main directory..." --weight=1 +ynh_install_nodejs --nodejs_version=$nodejs_version +ynh_use_nodejs + ynh_restore_file --origin_path="$install_dir" # $install_dir will automatically be initialized with some decent @@ -36,6 +39,9 @@ ynh_script_progression --message="Restoring system configurations related to $ap # This should be a symetric version of what happens in the install script +mkdir /var/log/$app +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.target" @@ -47,8 +53,6 @@ systemctl enable ${app}-back.service --quiet yunohost service add "${app}-front" --description="Crabfit NodeJS Frontend" --log="/var/log/$app/${app}-front.log" yunohost service add "${app}-back" --description="Crabfit Rust Backend" --log="/var/log/$app/${app}-back.log" -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #=================================================