mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +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.
|
- Include module static files in build, required for Debian package build.
|
||||||
- dynamicdns: Allow reading status as non-root.
|
- dynamicdns: Allow reading status as non-root.
|
||||||
- config: Set current domainname again after hostname change.
|
- config: Set current domainname again after hostname change.
|
||||||
|
- config: Handle clearing of domain name.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- repro: Use firewalld provided SIP services.
|
- repro: Use firewalld provided SIP services.
|
||||||
|
|||||||
@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
domainname="$1"
|
domainname="$1"
|
||||||
hostname=$(hostname)
|
hostname=$(hostname)
|
||||||
|
|
||||||
if [ -n "$domainname"] ; then
|
if [ -z "$domainname" ] ; then
|
||||||
if grep -q 127.0.1.1 /etc/hosts ; 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
|
sed -i "s/127.0.1.1.*/127.0.1.1 $hostname/" /etc/hosts
|
||||||
else
|
else
|
||||||
@ -33,4 +33,4 @@ else
|
|||||||
sed -i "/127.0.0.1.*/a \
|
sed -i "/127.0.0.1.*/a \
|
||||||
127.0.1.1 $hostname.$domainname $hostname" /etc/hosts
|
127.0.1.1 $hostname.$domainname $hostname" /etc/hosts
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user