mirror of
https://github.com/YunoHost-Apps/crabfit_ynh.git
synced 2024-09-03 18:16:21 +02:00
Fix backup and restore scripts
This commit is contained in:
parent
288fc6dc4a
commit
9bcc418eae
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue