1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garage_ynh.git synced 2024-09-03 18:36:32 +02:00

Simplify regenconf hook handling

This commit is contained in:
Alexandre Aubin 2023-08-21 16:39:18 +02:00
parent 3c81656a65
commit 490814db06
8 changed files with 5 additions and 17 deletions

View file

@ -32,8 +32,6 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
@ -54,9 +52,6 @@ ynh_backup --src_path="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
ynh_backup --src_path="/etc/systemd/system/$app.service"
ynh_backup --src_path="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -91,13 +91,9 @@ fi
#=================================================
# ADD REGEN-CONF HOOK
#=================================================
ynh_script_progression --message="adding regen-conf hook..." --weight=1
ynh_add_config --template="../sources/hooks/conf_regen/98-nginx_garage" --destination="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
#cp -R ../sources/hooks/conf_regen/98-nginx_garage /usr/share/yunohost/hooks/conf_regen/95-nginx_$app
ynh_systemd_action --service_name=nginx --action="reload"
ynh_script_progression --message="Adding regen-conf hook..." --weight=1
ynh_add_config --template="regenconf_nginx_garage" --destination="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
yunohost tools regen-conf nginx
#=================================================

View file

@ -114,7 +114,6 @@ ynh_secure_remove --file="/var/log/$app"
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
yunohost tools regen-conf nginx
ynh_systemd_action --service_name=nginx --action="reload"
#=================================================
# END OF SCRIPT

View file

@ -63,7 +63,6 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
yunohost tools regen-conf nginx
ynh_systemd_action --service_name=nginx --action="reload"
#=================================================
# RESTORE SYSTEMD

View file

@ -45,6 +45,9 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
ynh_add_config --template="regenconf_nginx_garage" --destination="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
yunohost tools regen-conf nginx
#=================================================
# SETUP SYSTEMD
#=================================================

View file

@ -1,2 +0,0 @@
*~
*.sw[op]

View file

@ -1,2 +0,0 @@
*~
*.sw[op]