mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-02-01 18:47:57 +08:00
Update install_pve.sh
This commit is contained in:
parent
7676edfa05
commit
6e4a8f190f
1 changed files with 2 additions and 2 deletions
|
@ -51,8 +51,8 @@ if [ "${hostname}" != "pve" ]; then
|
|||
# 注释掉查询到的行
|
||||
sudo sed -i "s/^$(echo ${hosts} | sed 's/\//\\\//g')/# &/" /etc/hosts
|
||||
# 添加新行
|
||||
echo "${ip} ${hostname} ${hostname}" | sudo tee -a /etc/hosts > /dev/null
|
||||
_green "已将 ${ip} ${hostname} ${hostname} 添加到 /etc/hosts 文件中"
|
||||
# echo "${ip} ${hostname} ${hostname}" | sudo tee -a /etc/hosts > /dev/null
|
||||
# _green "已将 ${ip} ${hostname} ${hostname} 添加到 /etc/hosts 文件中"
|
||||
else
|
||||
_blue "已存在 ${ip} ${hostname} ${hostname} 的记录,无需添加"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue