github.com/hernad/nomad@v1.6.112/e2e/upgrades/kill_node.sh (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 #/bin/bash 5 # This script takes the config file of the node being killed 6 # usage ./_kill_node.sh client1 7 if [ "$#" -ne 1 ]; then 8 echo "expected usage - ./kill_node.sh <client|server><1|2>" 9 exit 255 10 fi 11 CONFIG=$1 12 echo "Killing $CONFIG" 13 pid=`ps wwwaux | grep nomad | grep "$CONFIG.hcl" | awk 'BEGIN { FS = " " } ; { print $2 }'` 14 echo "killing pid $pid" 15 kill -9 $pid