mirror of
https://github.com/thelittlerocket/pve.git
synced 2024-11-15 11:38:00 +08:00
Update install_pve.sh
This commit is contained in:
parent
7f63250e81
commit
b6db7980b6
1 changed files with 3 additions and 0 deletions
|
@ -113,8 +113,11 @@ if [ "${hostname}" != "pve" ]; then
|
||||||
else
|
else
|
||||||
_blue "已存在 ${ip} ${hostname} ${hostname} 的记录,无需添加"
|
_blue "已存在 ${ip} ${hostname} ${hostname} 的记录,无需添加"
|
||||||
fi
|
fi
|
||||||
|
chattr -i /etc/hostname
|
||||||
hostnamectl set-hostname pve
|
hostnamectl set-hostname pve
|
||||||
|
chattr +i /etc/hostname
|
||||||
hostname=$(hostname)
|
hostname=$(hostname)
|
||||||
|
chattr -i /etc/hosts
|
||||||
if ! grep -q "::1 localhost" /etc/hosts; then
|
if ! grep -q "::1 localhost" /etc/hosts; then
|
||||||
echo "::1 localhost" >> /etc/hosts
|
echo "::1 localhost" >> /etc/hosts
|
||||||
echo "Added ::1 localhost to /etc/hosts"
|
echo "Added ::1 localhost to /etc/hosts"
|
||||||
|
|
Loading…
Reference in a new issue