startb:journal自带时间,不需要在标签名里重申
This commit is contained in:
@@ -73,10 +73,10 @@ log_to_journal() {
|
|||||||
# fi
|
# fi
|
||||||
|
|
||||||
if command -v systemd-cat >/dev/null 2>&1; then
|
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=$!
|
local pid=$!
|
||||||
disown "$pid" 2>/dev/null || true
|
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
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user