github.com/smithx10/nomad@v0.9.1-rc1/e2e/upgrades/kill_node.sh (about)

     1  #/bin/bash
     2  # This script takes the config file of the node being killed
     3  # usage ./_kill_node.sh client1
     4  if [ "$#" -ne 1 ]; then
     5      echo "expected usage - ./kill_node.sh <client|server><1|2>"
     6      exit 255
     7  fi
     8  CONFIG=$1
     9  echo "Killing $CONFIG"
    10  pid=`ps wwwaux | grep nomad | grep "$CONFIG.hcl" | awk 'BEGIN { FS = " " } ; { print $2 }'`
    11  echo "killing pid $pid"
    12  kill -9 $pid