fix(runtime): restart daemon in background
This commit is contained in:
12
run.sh
12
run.sh
@@ -11,4 +11,14 @@ if ! test -x ./strans; then
|
||||
echo "run.sh: ./strans is not executable; run make first" >&2
|
||||
exit 1
|
||||
fi
|
||||
exec ./strans map
|
||||
if ! command -v pkill >/dev/null 2>&1; then
|
||||
echo "run.sh: pkill is required" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
uid=$(id -u) || exit 1
|
||||
pkill -TERM -u "$uid" -x strans 2>/dev/null || :
|
||||
sleep 0.1
|
||||
pkill -KILL -u "$uid" -x strans 2>/dev/null || :
|
||||
|
||||
./strans map </dev/null &
|
||||
|
||||
Reference in New Issue
Block a user