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:
parent
3c81656a65
commit
490814db06
8 changed files with 5 additions and 17 deletions
|
@ -32,8 +32,6 @@ ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC BACKUP
|
# 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="/etc/systemd/system/$app.service"
|
||||||
|
|
||||||
|
|
||||||
ynh_backup --src_path="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -91,13 +91,9 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD REGEN-CONF HOOK
|
# ADD REGEN-CONF HOOK
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="adding regen-conf hook..." --weight=1
|
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_add_config --template="regenconf_nginx_garage" --destination="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
|
||||||
yunohost tools regen-conf nginx
|
yunohost tools regen-conf nginx
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -114,7 +114,6 @@ ynh_secure_remove --file="/var/log/$app"
|
||||||
|
|
||||||
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
|
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
|
||||||
yunohost tools regen-conf nginx
|
yunohost tools regen-conf nginx
|
||||||
ynh_systemd_action --service_name=nginx --action="reload"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -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"
|
ynh_restore_file --origin_path="/usr/share/yunohost/hooks/conf_regen/98-nginx_$app"
|
||||||
yunohost tools regen-conf nginx
|
yunohost tools regen-conf nginx
|
||||||
ynh_systemd_action --service_name=nginx --action="reload"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
|
|
|
@ -45,6 +45,9 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_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
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
2
sources/extra_files/app/.gitignore
vendored
2
sources/extra_files/app/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
*~
|
|
||||||
*.sw[op]
|
|
2
sources/patches/.gitignore
vendored
2
sources/patches/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
*~
|
|
||||||
*.sw[op]
|
|
Loading…
Add table
Reference in a new issue