From d3a27e5579ea31da54d82e734822502bacaeb0fe Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Wed, 8 Nov 2023 16:12:10 +0800 Subject: [PATCH] rc --- systemd/script/crontab.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/systemd/script/crontab.sh b/systemd/script/crontab.sh index 8218cb7a..1249fdf2 100644 --- a/systemd/script/crontab.sh +++ b/systemd/script/crontab.sh @@ -21,11 +21,8 @@ FILES="$cockpit_service_path $config_path" # 监控文件发生变动时需要做的事情 on_change() { set +e - # 从配置文件中获取端口号 - cockpit_port=$(docker exec -i websoft9-apphub apphub getconfig --section cockpit --key port) listen_stream=$(grep -Po 'ListenStream=\K[0-9]*' /lib/systemd/system/cockpit.socket) - if [ "$cockpit_port" != "$listen_stream" ]; then sed -i "s/ListenStream=${listen_stream}/ListenStream=${cockpit_port}/" /lib/systemd/system/cockpit.socket systemctl daemon-reload @@ -33,7 +30,6 @@ on_change() { systemctl restart cockpit || exit 1 set_Firewalld fi - set -e }