s6-rc-up-tree pass -b to s6-rc command

This commit is contained in:
Daniel Barlow 2024-07-08 20:50:00 +01:00
parent 2e8e05f31a
commit afcc6a6436
2 changed files with 5 additions and 4 deletions

View File

@ -28,7 +28,7 @@
(fn stopped-controlled-services [dir]
(let [controlled (controlled-services dir)]
(with-popen [h (.. "s6-rc -da list")]
(with-popen [h (.. "s6-rc -b -da list")]
(collect [s (h:lines)]
(if (. controlled s) (values s s))))))
@ -39,9 +39,8 @@
(popen (.. "s6-rc-db -d all-dependencies " service)))
(fn start-service [name]
(case (os.execute (.. "s6-rc -u change " name))
(ok) nil
(nil err) (fail err)))
(with-popen [h (.. "s6-rc -b -u change " name)]
(print (h:read "*a"))))
(fn run [dir]
(let [service (. arg 1)

View File

@ -1,6 +1,8 @@
#!/usr/bin/env sh
echo s6-rc $@
[ "$1" = "-b" ] && shift
if [ "$1" = "-da" ]; then
if [ "$2" = "list" ]; then
echo wattle # controlled