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:
nakamochi/ndg#17
dev
alex 2 years ago
parent e856de67ac
commit 1be6a4dbe8
Signed by: x1ddos
GPG Key ID: 540189B756BF5B12

@ -25,6 +25,19 @@ ndg_bin_install() {
ndg_svc_install() { ndg_svc_install() {
local svdir=/etc/sv/nd local svdir=/etc/sv/nd
mkdir -p $svdir mkdir -p $svdir
cat <<EOF > $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 <<EOF > $svdir/run.new cat <<EOF > $svdir/run.new
#!/bin/sh #!/bin/sh
exec $NDG_BINDIR/nd -gui $NDG_BINDIR/ngui -gui-user uiuser -wpa /var/run/wpa_supplicant/wlan0 2>&1 exec $NDG_BINDIR/nd -gui $NDG_BINDIR/ngui -gui-user uiuser -wpa /var/run/wpa_supplicant/wlan0 2>&1

Loading…
Cancel
Save