1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/redirect_ynh.git synced 2024-09-03 20:16:10 +02:00
redirect_ynh/scripts/restore

21 lines
661 B
Bash

#!/bin/bash
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
ynh_restore_file "/etc/nginx/conf.d/${domain}.d/${app}.conf"
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
# When testing on the CI, we need a service to test the reverse-proxying
if [[ ${PACKAGE_CHECK_EXEC} == "1" ]] && [[ "$redirect_type" == "reverseproxy" ]]
then
_add_dummy_service
fi
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --last