更新 scripts/set_ip.sh

This commit is contained in:
joy 2025-10-16 09:42:07 +08:00
parent 4e345e1949
commit ac9bf12296
1 changed files with 5 additions and 1 deletions

View File

@ -50,6 +50,10 @@ echo -e "修改主机名称"
hostnamectl set-hostname "${INBAND_IP//./-}"
bash
# 9. 最终提示
# 9.清理记录
crontab -l | grep -v '@reboot bash /opt/set_ip.sh > /tmp/ip_tmp.log' | crontab -
>/opt/ip.txt
# 10. 最终提示
echo -e "[完成] 网络配置已更新,可通过 'ip addr show eth0' 查看实际生效情况"
exit 0