From 1be6a4dbe8cfb9bcf3df121905226a7b5edb6107 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 13 Mar 2023 18:03:29 +0100 Subject: [PATCH] ndg: make sure ngui process terminates at sv stop it is unclear why ngui is sometimes hanging after stopping nd service. for now, this is a working around. follow this issue for more: https://git.qcode.ch/nakamochi/ndg/issues/17 --- ndg/env | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ndg/env b/ndg/env index 1996546..7f22d3a 100644 --- a/ndg/env +++ b/ndg/env @@ -25,6 +25,19 @@ ndg_bin_install() { ndg_svc_install() { local svdir=/etc/sv/nd mkdir -p $svdir + + cat < $svdir/finish.new +#!/bin/sh +# workaround https://git.qcode.ch/nakamochi/ndg/issues/17 +pkill ngui +EOF + chmod +x $svdir/finish.new + test -f $svdir/finish && diff $svdir/finish $svdir/finish.new + if [ $? -ne 0 ]; then + mv $svdir/finish.new $svdir/finish + fi + rm -f $svdir/finish.new + cat < $svdir/run.new #!/bin/sh exec $NDG_BINDIR/nd -gui $NDG_BINDIR/ngui -gui-user uiuser -wpa /var/run/wpa_supplicant/wlan0 2>&1