fix bug
This commit is contained in:
parent
716422073f
commit
9dbb28d168
@ -65,7 +65,7 @@ EOL
|
||||
)
|
||||
|
||||
# 检查 /etc/hosts 中是否已经存在这些条目
|
||||
if ! grep -Fxq "$HOSTS_CONTENT" /etc/hosts; then
|
||||
if ! grep -Fxf <(echo "$HOSTS_CONTENT") /etc/hosts > /dev/null; then
|
||||
echo "Adding entries to /etc/hosts..."
|
||||
echo "$HOSTS_CONTENT" | sudo tee -a /etc/hosts > /dev/null
|
||||
echo "Entries added successfully."
|
||||
|
Loading…
x
Reference in New Issue
Block a user