diff --git a/update-hosts-lxc.sh b/update-hosts-lxc.sh index 44c7144..1e3afa4 100644 --- a/update-hosts-lxc.sh +++ b/update-hosts-lxc.sh @@ -23,7 +23,7 @@ echo "$SERVER_IP $SERVER_NAME" > /tmp/new_hosts # Leggi il contenuto originale di /etc/hosts while IFS= read -r line; do # Ignora le righe che contengono SERVER_IP ma non SERVER_NAME - if [[ ! "$line" == *"$SERVER_IP"* ]] || [[ "$line" == *"127.0.0.1 $SERVER_NAME"* ]]; then + if [[ ! "$line" == *"$SERVER_IP"* ]] || [[ "$line" == *"127.0.1.1 $SERVER_NAME"* ]]; then echo "$line" >> /tmp/new_hosts fi done < /etc/hosts