dot

packages and services management
Log | Files | Refs | README

commit 7743025942b907767595ef209a9dc6461f6b89e6
parent 05bf753956412155e68c0871f4fb0a46547be37b
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue, 20 Nov 2018 21:41:15 +0100

bin/service-status: make use of ptree (fixed/improved) and tail

Diffstat:
Mbin/ptree | 5+++--
Mbin/service-status | 8+++++++-
Ms6/geomyidae/x/env/ROOT | 2+-
3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/bin/ptree b/bin/ptree @@ -114,10 +114,11 @@ BEGIN { VOID = " "; list(entries); - NUM = 1; fill(entries, 1, 0); + if (ARGC == 1) PID = 1; else PID = ARGV[1]; + NUM = 0; fill(entries, PID, 0); tree(entries, NUM); - for (i = 1; i < NUM; i++) { + for (i = 0; i < NUM; i++) { printf("%s", entries[i":info"]); for (j = 1; entries[i":"j] != ""; j++) printf("%s", entries[i":"j]); diff --git a/bin/service-status b/bin/service-status @@ -1,4 +1,10 @@ #!/usr/bin/env execlineb backtick x { dollarat -n -d : } importas name x -s6-svstat /run/s6/$name + +if { printf " " } +if { s6-svstat /run/s6/$name } +if { printf "\n" } +if { backtick -n x { s6-svstat -o pid /run/s6/$name } importas x x ptree $x } +if { printf "\n" } +if { tail /var/log/${name}/current } diff --git a/s6/geomyidae/x/env/ROOT b/s6/geomyidae/x/env/ROOT @@ -1 +1 @@ -/var/www/plain/ +/var/gopher