Harden NordVPN reconciliation and WebGUI testing
This commit is contained in:
parent
a115d2a012
commit
b4a30ca190
1 changed files with 777 additions and 97 deletions
23
tests/ui/stop-opnsense.sh
Executable file
23
tests/ui/stop-opnsense.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
pid_file="$script_dir/.runtime/launcher.pid"
|
||||
|
||||
if [ ! -r "$pid_file" ]; then
|
||||
rm -f "$script_dir/.runtime/launcher.log"
|
||||
exit 0
|
||||
fi
|
||||
read -r pid < "$pid_file"
|
||||
case "$pid" in
|
||||
'' | *[!0-9]*) exit 1 ;;
|
||||
esac
|
||||
command=$(ps -p "$pid" -o command= 2>/dev/null || true)
|
||||
case "$command" in
|
||||
*"$script_dir/start-opnsense.sh"*)
|
||||
kill "$pid"
|
||||
rm -f "$script_dir/.runtime/launcher.log"
|
||||
;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
Loading…
Reference in a new issue