Update update-hosts-lxc.sh
This commit is contained in:
parent
7fa2306101
commit
9813796cf4
@ -23,7 +23,7 @@ echo "$SERVER_IP $SERVER_NAME" > /tmp/new_hosts
|
|||||||
# Leggi il contenuto originale di /etc/hosts
|
# Leggi il contenuto originale di /etc/hosts
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
# Ignora le righe che contengono SERVER_IP ma non SERVER_NAME
|
# 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
|
echo "$line" >> /tmp/new_hosts
|
||||||
fi
|
fi
|
||||||
done < /etc/hosts
|
done < /etc/hosts
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user