mirror of
https://github.com/YunoHost-Apps/nomad_ynh.git
synced 2024-09-03 19:55:53 +02:00
Fix dnsmasq
This commit is contained in:
parent
de744d00da
commit
711d189463
4 changed files with 7 additions and 4 deletions
2
conf/dnsmasq-lxd
Normal file
2
conf/dnsmasq-lxd
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bind-interfaces
|
||||||
|
except-interface=__LXC_BRIDGE__
|
|
@ -187,8 +187,7 @@ then
|
||||||
chmod 400 "$config_path/client.hcl"
|
chmod 400 "$config_path/client.hcl"
|
||||||
chown $app:$app "$config_path/client.hcl"
|
chown $app:$app "$config_path/client.hcl"
|
||||||
|
|
||||||
echo "bind-interfaces
|
ynh_add_config --template="../conf/dnsmasq-lxd" --destination="/etc/dnsmasq.d/lxd"
|
||||||
except-interface=lxdbr0" > /etc/dnsmasq.d/lxd
|
|
||||||
systemctl restart dnsmasq
|
systemctl restart dnsmasq
|
||||||
|
|
||||||
ynh_add_config --template="../conf/default.conf" --destination="/etc/lxc/default.conf"
|
ynh_add_config --template="../conf/default.conf" --destination="/etc/lxc/default.conf"
|
||||||
|
|
|
@ -41,6 +41,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Stopping and removing the systemd service..."
|
ynh_script_progression --message="Stopping and removing the systemd service..."
|
||||||
|
|
||||||
|
nomad node drain -self -enable
|
||||||
# Remove the dedicated systemd config
|
# Remove the dedicated systemd config
|
||||||
ynh_remove_systemd_config
|
ynh_remove_systemd_config
|
||||||
|
|
||||||
|
@ -96,6 +97,8 @@ then
|
||||||
systemctl disable lxc-net --quiet
|
systemctl disable lxc-net --quiet
|
||||||
ynh_secure_remove --file="/etc/default/lxc-net"
|
ynh_secure_remove --file="/etc/default/lxc-net"
|
||||||
ynh_secure_remove --file="/etc/lxc/default.conf"
|
ynh_secure_remove --file="/etc/lxc/default.conf"
|
||||||
|
ynh_secure_remove --file="/etc/dnsmasq.d/lxd"
|
||||||
|
systemctl restart dnsmasq
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -113,8 +113,7 @@ then
|
||||||
main_iface=$(ip route | grep default | awk '{print $5;}')
|
main_iface=$(ip route | grep default | awk '{print $5;}')
|
||||||
ynh_app_setting_set --app=$app --key=main_iface --value=$main_iface
|
ynh_app_setting_set --app=$app --key=main_iface --value=$main_iface
|
||||||
|
|
||||||
echo "bind-interfaces
|
ynh_add_config --template="../conf/dnsmasq-lxd" --destination="/etc/dnsmasq.d/lxd"
|
||||||
except-interface=lxdbr0" > /etc/dnsmasq.d/lxd
|
|
||||||
systemctl restart dnsmasq
|
systemctl restart dnsmasq
|
||||||
|
|
||||||
ynh_add_config --template="../conf/lxc-net" --destination="/etc/default/lxc-net"
|
ynh_add_config --template="../conf/lxc-net" --destination="/etc/default/lxc-net"
|
||||||
|
|
Loading…
Reference in a new issue