
Add a single-purpose script to shut down the controller node from another node. Change-Id: Ic70e211a8fd3e8ad4c448045b65000be209b00de
19 lines
397 B
Bash
Executable File
19 lines
397 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -o errexit -o nounset
|
|
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
|
|
source "$TOP_DIR/config/paths"
|
|
source "$LIB_DIR/functions.guest"
|
|
|
|
indicate_current_auto
|
|
|
|
exec_logfile
|
|
|
|
echo "Shutting down the controller node."
|
|
|
|
ssh \
|
|
-o "UserKnownHostsFile /dev/null" \
|
|
-o "StrictHostKeyChecking no" \
|
|
-i "$HOME/.ssh/vagrant" \
|
|
controller-mgmt \
|
|
sudo /sbin/shutdown -P now
|