1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/uptime-kuma_ynh.git synced 2024-10-01 13:34:58 +02:00

Update restore

This commit is contained in:
Éric Gaspar 2023-03-21 10:24:15 +01:00
parent 37e3a701c5
commit 27a580f669

View file

@ -21,14 +21,22 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# INSTALL NODEJS
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling nodejs version..." --weight=2
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# 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"
ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_restore_file --origin_path="/var/log/$app/"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
@ -39,9 +47,11 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
yunohost service add $app --description="Monitoring tool" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
# GENERIC FINALIZATION
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"