From ac9bf122961bae759e08810afd9a3fcc4bfec75d Mon Sep 17 00:00:00 2001 From: joy Date: Thu, 16 Oct 2025 09:42:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20scripts/set=5Fip.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/set_ip.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/set_ip.sh b/scripts/set_ip.sh index 2aae4f0..260698e 100644 --- a/scripts/set_ip.sh +++ b/scripts/set_ip.sh @@ -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 \ No newline at end of file