From cb4bc68c48de697ac2d29442d722e955ce578a72 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Fri, 11 Aug 2023 22:07:59 +0000 Subject: [PATCH] fix syntax [skip ci] --- install.sh | 4 ++-- restore.sh | 4 ++-- update.sh | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 0b9a1f7d..7cf88e6e 100644 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/restore.sh b/restore.sh index ad01f7dc..ebb02f69 100755 --- a/restore.sh +++ b/restore.sh @@ -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 diff --git a/update.sh b/update.sh index 60982e33..bc9408a1 100644 --- a/update.sh +++ b/update.sh @@ -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