[*] 修改判断条件
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 38s

This commit is contained in:
Martin 2025-01-05 23:55:09 +08:00
parent 1d36cdba41
commit 28a83e30f5
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ server ntp5.aliyun.com iburst
driftfile /var/lib/chrony/drift driftfile /var/lib/chrony/drift
allow 127.0.0.1 allow 127.0.0.1
EOF EOF
if command -v systemctl >/dev/null 2>&1; then if pidof systemd >/dev/null 2>&1; then
systemctl restart chrony && systemctl enable chrony systemctl restart chrony && systemctl enable chrony
else else
echo "systemctl 不存在,跳过 chrony 的重启" echo "systemctl 不存在,跳过 chrony 的重启"

View File

@ -21,7 +21,7 @@ cat > /etc/docker/daemon.json <<EOF
} }
EOF EOF
if command -v systemctl >/dev/null 2>&1; then if pidof systemd >/dev/null 2>&1; then
systemctl restart docker systemctl restart docker
else else
echo "systemctl 不存在,跳过 docker 重启。" echo "systemctl 不存在,跳过 docker 重启。"