Unverified Commit 9c5ed787 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Shellcheck

parent 82c8f05e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -5,10 +5,10 @@ trap exit SIGINT SIGTERM
# Close any previous instances
script_name=${BASH_SOURCE[0]}

for pid in $(pidof -x $script_name); do
  if [ $pid != $$ ]; then
    kill -15 $pid 2> /dev/null
    wait $pid 2> /dev/null
for pid in $(pidof -x "$script_name"); do
  if [ "$pid" != $$ ]; then
    kill -15 "$pid" 2> /dev/null
    wait "$pid" 2> /dev/null
  fi
done