1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lstu_ynh.git synced 2024-09-03 19:36:12 +02:00

Fix restore

This commit is contained in:
yalh76 2020-05-29 12:37:16 +02:00
parent 1e416359f0
commit 3bf4fd5830

View file

@ -48,7 +48,7 @@ test ! -d $final_path \
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_print_info --message="Restoring the nginx configuration..." --weight=1
ynh_script_progression --message="Restoring the nginx configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -70,7 +70,7 @@ ynh_system_user_create --username=$app
#=================================================
# RESTORE USER RIGHTS
#=================================================
ynh_print_info --message="Restoring user rights..." --weight=1
ynh_script_progression --message="Restoring user rights..." --weight=1
# Restore permissions on app files
chown -R www-data $final_path
@ -80,7 +80,7 @@ chown -R www-data $final_path
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_print_info --message="Reinstalling dependencies..." --weight=1
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
@ -91,7 +91,7 @@ echo yes | cpanm Carton
#=================================================
# RESTORE THE POSTGRESQL DATABASE
#=================================================
ynh_print_info --message="Restoring the PostregSQL database..." --weight=1
ynh_script_progression --message="Restoring the PostregSQL database..." --weight=1
ynh_psql_test_if_first_run
@ -110,21 +110,21 @@ systemctl enable $app.service
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_print_info --message="Integrating service in YunoHost..." --weight=1
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --log "/var/log/$app.log" --log "/var/www/$app/log/production.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_print_info --message="Starting a systemd service..." --weight=1
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server available at"
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_print_info --message="Restoring the logrotate configuration..." --weight=1
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
ynh_restore_file --origin_path="/etc/logrotate.d/$app"