dot

packages and services management
Log | Files | Refs | README

commit 2cb174cc881f7d72d1678733e4fe1c43dd45cd30
parent 2c26fff1349aafcd274f1bf4e86e07b840046086
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Thu, 22 Jun 2017 10:24:45 +0200

Working version

Diffstat:
MSERVICE | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/SERVICE b/SERVICE @@ -34,19 +34,16 @@ do if cmp "$VAR/pid/$srv/$pid" "/proc/$pid/cmdline" 2> /dev/null then + act=1 cmdline="$(tr '\0' ' ' < "$VAR/pid/$srv/$pid")" + if [ "$cmd" = stop ] || [ "$cmd" = restart ] then kill -14 "$pid" && rm -f "$VAR/pid/$srv/$pid" && - printf '%-15s [stoping]' "$srv" + printf '%-15s [stoping] %s\n' "$srv" "$cmdline" else run=1 - printf '%-15s [running]' "$srv" + printf '%-15s [running] %s\n' "$srv" "$cmdline" fi - - tr '\0' ' ' < "$VAR/pid/$srv/$pid" - printf '\n' - - act=1 fi done