mirror of
https://github.com/YunoHost-Apps/yunorunner_ynh.git
synced 2024-09-03 20:36:13 +02:00
Fix DHCP communication
This commit is contained in:
parent
cd94ef4eb3
commit
9f597ef3a5
7 changed files with 27 additions and 0 deletions
3
conf/firewall_rules.sh
Normal file
3
conf/firewall_rules.sh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
iptables -t filter -A INPUT -i lxdbr0 -p udp -d 255.255.255.255 --dport 67 -j ACCEPT
|
|
@ -55,6 +55,19 @@ exposed_ports_if_cluster() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ynh_firewall_add_tweak() {
|
||||||
|
mkdir -p "/etc/yunohost/hooks.d/post_iptable_rules"
|
||||||
|
|
||||||
|
ynh_add_config --template="firewall_rules.sh" --destination="/etc/yunohost/hooks.d/post_iptable_rules/50-${app}"
|
||||||
|
yunohost firewall reload
|
||||||
|
}
|
||||||
|
|
||||||
|
_ynh_firewall_remove_tweak() {
|
||||||
|
ynh_secure_remove --file="/etc/yunohost/hooks.d/post_iptable_rules/50-${app}"
|
||||||
|
yunohost firewall git remote add origin git@github.com:user/repository.git
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -35,6 +35,8 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/cron.d/$app"
|
ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
|
|
||||||
|
ynh_backup --src_path="/etc/yunohost/hooks.d/post_iptable_rules/50-${app}"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -87,6 +87,8 @@ yunohost service add "$app" --description="$app daemon for YunoRunner" $(exposed
|
||||||
|
|
||||||
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
|
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
|
||||||
|
|
||||||
|
_ynh_firewall_add_tweak
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -23,6 +23,8 @@ ynh_remove_systemd_config
|
||||||
# Remove the dedicated NGINX config
|
# Remove the dedicated NGINX config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
|
_ynh_firewall_remove_tweak
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -59,6 +59,9 @@ yunohost service add "$app" --description="$app daemon for YunoRunner" $(exposed
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||||
|
|
||||||
|
ynh_restore_file --origin_path="/etc/yunohost/hooks.d/post_iptable_rules/50-${app}"
|
||||||
|
yunohost firewall reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -141,6 +141,8 @@ yunohost service add "$app" --description="$app daemon for YunoRunner" $(exposed
|
||||||
|
|
||||||
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
|
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
|
||||||
|
|
||||||
|
_ynh_firewall_add_tweak
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue