mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
Reverse logic for clearing domain name
This commit is contained in:
parent
4def7dfa7f
commit
d220fa946a
@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Include module static files in build, required for Debian package build.
|
||||
- dynamicdns: Allow reading status as non-root.
|
||||
- config: Set current domainname again after hostname change.
|
||||
- config: Handle clearing of domain name.
|
||||
|
||||
### Changed
|
||||
- repro: Use firewalld provided SIP services.
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user