startb:journal自带时间,不需要在标签名里重申

This commit is contained in:
2026-04-01 12:07:10 +08:00
parent 10d03bc051
commit ae49f96777

View File

@@ -73,10 +73,10 @@ log_to_journal() {
# fi
if command -v systemd-cat >/dev/null 2>&1; then
nohup setsid systemd-cat -t "$UNIT_NAME" -- "${COMMAND[@]}" >/dev/null 2>&1 &
nohup setsid systemd-cat -t "$UNIT_BASE" -- "${COMMAND[@]}" >/dev/null 2>&1 &
local pid=$!
disown "$pid" 2>/dev/null || true
echo "$UNIT_NAME started with systemd-cat (pid=$pid), journald logging enabled"
echo "$UNIT_BASE started with systemd-cat (pid=$pid), journald logging enabled"
return 0
fi