fix syntax [skip ci]
This commit is contained in:
parent
3ce6b38247
commit
cb4bc68c48
|
@ -138,8 +138,8 @@ while [[ $letsemail != *[@]*[.]* ]]; do
|
|||
done
|
||||
|
||||
if grep -q manage_etc_hosts /etc/hosts; then
|
||||
sudo sed -i '/manage_etc_hosts = True/d' /etc/cloud/cloud.cfg >/dev/null
|
||||
echo -e "\nmanage_etc_hosts = False" | sudo tee --append /etc/cloud/cloud.cfg >/dev/null
|
||||
sudo sed -i '/manage_etc_hosts: true/d' /etc/cloud/cloud.cfg >/dev/null
|
||||
echo -e "\nmanage_etc_hosts: false" | sudo tee --append /etc/cloud/cloud.cfg >/dev/null
|
||||
sudo systemctl restart cloud-init >/dev/null
|
||||
fi
|
||||
|
||||
|
|
|
@ -411,8 +411,8 @@ deactivate
|
|||
print_green 'Restoring hosts file'
|
||||
|
||||
if grep -q manage_etc_hosts /etc/hosts; then
|
||||
sudo sed -i '/manage_etc_hosts = True/d' /etc/cloud/cloud.cfg >/dev/null
|
||||
echo -e "\nmanage_etc_hosts = False" | sudo tee --append /etc/cloud/cloud.cfg >/dev/null
|
||||
sudo sed -i '/manage_etc_hosts: true/d' /etc/cloud/cloud.cfg >/dev/null
|
||||
echo -e "\nmanage_etc_hosts: false" | sudo tee --append /etc/cloud/cloud.cfg >/dev/null
|
||||
sudo systemctl restart cloud-init >/dev/null
|
||||
fi
|
||||
|
||||
|
|
|
@ -362,9 +362,9 @@ MESHDOMAIN=$(python manage.py get_config meshdomain)
|
|||
deactivate
|
||||
|
||||
if grep -q manage_etc_hosts /etc/hosts; then
|
||||
sudo sed -i '/manage_etc_hosts = True/d' /etc/cloud/cloud.cfg >/dev/null
|
||||
if ! grep -q "manage_etc_hosts = False" /etc/cloud/cloud.cfg; then
|
||||
echo -e "\nmanage_etc_hosts = False" | sudo tee --append /etc/cloud/cloud.cfg >/dev/null
|
||||
sudo sed -i '/manage_etc_hosts: true/d' /etc/cloud/cloud.cfg >/dev/null
|
||||
if ! grep -q "manage_etc_hosts: false" /etc/cloud/cloud.cfg; then
|
||||
echo -e "\nmanage_etc_hosts: false" | sudo tee --append /etc/cloud/cloud.cfg >/dev/null
|
||||
sudo systemctl restart cloud-init >/dev/null
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue