mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[conf] Automatically disable/stop systemd-resolved that conflicts with dnsmasq on fresh setups ...
This commit is contained in:
parent
fa5130a7fc
commit
fa59ad35a9
1 changed files with 10 additions and 2 deletions
|
@ -69,8 +69,16 @@ do_post_regen() {
|
|||
short_hostname=$(hostname -s)
|
||||
grep -q "127.0.0.1.*$short_hostname" /etc/hosts || echo -e "\n127.0.0.1\t$short_hostname" >>/etc/hosts
|
||||
|
||||
[[ -z "$regen_conf_files" ]] \
|
||||
|| service dnsmasq restart
|
||||
[[ -n "$regen_conf_files" ]] || return
|
||||
|
||||
# Remove / disable services likely to conflict with dnsmasq
|
||||
for SERVICE in systemd-resolved bind9
|
||||
do
|
||||
systemctl is-enabled $SERVICE &>/dev/null && systemctl disable $SERVICE 2>/dev/null
|
||||
systemctl is-active $SERVICE &>/dev/null && systemctl stop $SERVICE
|
||||
done
|
||||
|
||||
systemctl restart dnsmasq
|
||||
}
|
||||
|
||||
FORCE=${2:-0}
|
||||
|
|
Loading…
Add table
Reference in a new issue