mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-02-26 18:17:09 +00:00
Fix resolv.conf failing to delete due to file attributes
This commit is contained in:
parent
e6c354c312
commit
d19640c550
@ -356,6 +356,10 @@ fi
|
|||||||
# which is where bind9 will be running. Obviously don't do this before
|
# which is where bind9 will be running. Obviously don't do this before
|
||||||
# installing bind9 or else apt won't be able to resolve a server to
|
# installing bind9 or else apt won't be able to resolve a server to
|
||||||
# download bind9 from.
|
# download bind9 from.
|
||||||
|
# Deleting resolv.conf fails if the file has the immutable attribute
|
||||||
|
# or the append only attribute. So we ensure those attributes are not set
|
||||||
|
# before attempting to delete the file.
|
||||||
|
chattr -a -i /etc/resolv.conf
|
||||||
rm -f /etc/resolv.conf
|
rm -f /etc/resolv.conf
|
||||||
tools/editconf.py /etc/systemd/resolved.conf DNSStubListener=no
|
tools/editconf.py /etc/systemd/resolved.conf DNSStubListener=no
|
||||||
echo "nameserver 127.0.0.1" > /etc/resolv.conf
|
echo "nameserver 127.0.0.1" > /etc/resolv.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user