更新 restart-docker.sh

This commit is contained in:
lc 2025-03-17 00:46:25 +00:00
parent 39f30c64a6
commit 2e12421243

View File

@ -1,8 +1,8 @@
#!/bin/bash
# 定义容器名称
CONTAINER_A="container_a"
CONTAINER_B="container_b"
CONTAINER_A="clouddrive2"
CONTAINER_B="emby"
# 获取容器 A 的初始启动时间
INITIAL_START_TIME=$(docker inspect --format='{{.State.StartedAt}}' $CONTAINER_A)
@ -20,6 +20,6 @@ while true; do
INITIAL_START_TIME=$CURRENT_START_TIME
fi
# 每隔 5 秒检查一次
sleep 5
# 每隔 600 秒检查一次
sleep 600
done