Skip to content

Commit

Permalink
Update trafficcop.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ypq123456789 authored Jul 1, 2024
1 parent 9f4aeca commit 0d0a6cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion trafficcop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CONFIG_FILE="/root/traffic_monitor_config.txt"
LOG_FILE="/root/traffic_monitor.log"
SCRIPT_PATH="/root/traffic_monitor.sh"

echo "$(date '+%Y-%m-%d %H:%M:%S') 当前版本:1.0.15"| tee -a "$LOG_FILE"
echo "$(date '+%Y-%m-%d %H:%M:%S') 当前版本:1.0.16"| tee -a "$LOG_FILE"

# 检查并安装必要的软件包
check_and_install_packages() {
Expand Down Expand Up @@ -240,6 +240,9 @@ setup_crontab() {

# 主函数
main() {
# 首先检查并安装必要的软件包
check_and_install_packages

if [[ ! -f "$CONFIG_FILE" ]] || [[ ! -s "$CONFIG_FILE" ]]; then
echo "$(date '+%Y-%m-%d %H:%M:%S') 配置文件不存在或为空,开始初始配置" | tee -a "$LOG_FILE"
initial_config
Expand Down

0 comments on commit 0d0a6cb

Please sign in to comment.