1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/monitorix_ynh.git synced 2024-09-03 19:46:06 +02:00

Move hook in etc/yunohost/hook.d

This commit is contained in:
Josué Tille 2018-08-31 14:52:48 +02:00
parent 849655ba6c
commit fd0916fafe
5 changed files with 4 additions and 10 deletions

View file

@ -27,7 +27,7 @@ ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
ynh_backup "/etc/nginx/conf.d/monitorix_status.conf" "monitorix_status.conf" ynh_backup "/etc/nginx/conf.d/monitorix_status.conf" "monitorix_status.conf"
# Copy hook # Copy hook
ynh_backup "/usr/share/yunohost/hooks/post_iptable_rules/50-$app" ynh_backup "/etc/yunohost/hooks.d/post_iptable_rules/50-$app"
# Copy Monitorix configuration # Copy Monitorix configuration
ynh_backup "/etc/monitorix" "config" ynh_backup "/etc/monitorix" "config"

View file

@ -51,10 +51,6 @@ config_nginx
# Update monitorix configuration # Update monitorix configuration
config_monitorix config_monitorix
# Add hook
mkdir -p /usr/share/yunohost/hooks/post_iptable_rules
cp ../conf/post_iptable_rules_hook /usr/share/yunohost/hooks/post_iptable_rules/50-$app
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -71,4 +67,4 @@ yunohost service add monitorix
sudo systemctl stop monitorix.service sudo systemctl stop monitorix.service
sleep 1 sleep 1
pkill -f "monitorix-httpd listening on" || true pkill -f "monitorix-httpd listening on" || true
ynh_check_starting ' - Ok, ready.' '/var/log/monitorix' ynh_check_starting ' - Ok, ready.' '/var/log/monitorix'

View file

@ -29,7 +29,6 @@ ynh_mysql_drop_user "$dbuser" || true
# Remove data # Remove data
ynh_secure_remove /var/lib/monitorix ynh_secure_remove /var/lib/monitorix
ynh_secure_remove /usr/share/yunohost/hooks/post_iptable_rules/50-$app
# Remove nginx config # Remove nginx config
ynh_secure_remove "/etc/nginx/conf.d/monitorix_status.conf" ynh_secure_remove "/etc/nginx/conf.d/monitorix_status.conf"

View file

@ -48,9 +48,8 @@ config_nginx
# Update monitorix configuration # Update monitorix configuration
config_monitorix config_monitorix
# Add hook # Remove old hook if exist
mkdir -p /usr/share/yunohost/hooks/post_iptable_rules ynh_secure_remove /usr/share/yunohost/hooks/post_iptable_rules/50-$app
cp ../conf/post_iptable_rules_hook /usr/share/yunohost/hooks/post_iptable_rules/50-$app
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION