commit 7ca00b849b8ae91b7a22ffabe8b6bf1c76f0075c parent 028fc629b711849707cb7617b31d2b055e5875f8 Author: Jan Pobrislo <ccx@webprojekty.cz> Date: Fri, 18 Dec 2020 15:53:16 +0100 Start container before creating abduco session. Diffstat:
M | bin/handle-nsx11-message | | | 11 | ++++++++++- |
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/bin/handle-nsx11-message b/bin/handle-nsx11-message @@ -46,6 +46,11 @@ adjust-brightness() { }' } +ensure-container-started() { + [[ $1 == */* ]] && return 1 + s6-svc -wU -T 5000 -o /run/service/container.$1 +} + abduco-run() { local container session cmd rest out local -a socket @@ -67,6 +72,10 @@ abduco-run() { return 1 fi + if ! ensure-container-started $container; then + nag -m "Failed to start container ${(qqq)container}" + return 1 + fi socket=( /run/containers/$container/run/abduco/$USER/$session@*(=N) ) if (( $#socket == 0 )); then @@ -78,7 +87,7 @@ abduco-run() { return 1 fi else - nag -m "Error spawning session (exit $?): ${(qqq)out)}" + nag -m "Error spawning session (exit $?): ${(qqq)out}" return 1 fi else