mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Reverse logic for clearing domain name
This commit is contained in:
2 files changed
+4
-3
No files matched your search
@@ -18,8 +18,8 @@
|
||||
|
||||
domainname="$1"
|
||||
hostname=$(hostname)
|
||||
|
||||
if [ -n "$domainname"] ; then
|
||||
|
||||
if [ -z "$domainname" ] ; then
|
||||
if grep -q 127.0.1.1 /etc/hosts ; then
|
||||
sed -i "s/127.0.1.1.*/127.0.1.1 $hostname/" /etc/hosts
|
||||
else
|
||||
@@ -33,4 +33,4 @@ else
|
||||
sed -i "/127.0.0.1.*/a \
|
||||
127.0.1.1 $hostname.$domainname $hostname" /etc/hosts
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
Reference in new issue
Block a user