mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Be sure to get the correct PID
This commit is contained in:
parent
9052bb0b78
commit
631ca47636
1 changed files with 4 additions and 2 deletions
|
@ -96,12 +96,14 @@ ynh_systemd_action() {
|
||||||
if [ "$log_path" == "systemd" ] ; then
|
if [ "$log_path" == "systemd" ] ; then
|
||||||
# Read the systemd journal
|
# Read the systemd journal
|
||||||
journalctl --unit=$service_name --follow --since=-0 --quiet > "$templog" &
|
journalctl --unit=$service_name --follow --since=-0 --quiet > "$templog" &
|
||||||
|
# Get the PID of the journalctl command
|
||||||
|
local pid_tail=$!
|
||||||
else
|
else
|
||||||
# Read the specified log file
|
# Read the specified log file
|
||||||
tail -F -n0 "$log_path" > "$templog" &
|
tail -F -n0 "$log_path" > "$templog" &
|
||||||
|
# Get the PID of the tail command
|
||||||
|
local pid_tail=$!
|
||||||
fi
|
fi
|
||||||
# Get the PID of the tail command
|
|
||||||
local pid_tail=$!
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${action^} the service $service_name" >&2
|
echo "${action^} the service $service_name" >&2
|
||||||
|
|
Loading…
Add table
Reference in a new issue