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

This commit is contained in:
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
allow 127.0.0.1
EOF
if command -v systemctl >/dev/null 2>&1; then
if pidof systemd >/dev/null 2>&1; then
systemctl restart chrony && systemctl enable chrony
else
echo "systemctl 不存在,跳过 chrony 的重启"