This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Call `setup_ssh_socket` to setup the control socket (function will return once | |
# the socket is ready to go), and `ssh_target` will connect using the control socket. | |
# Assumes TARGET_HOST variable is set. | |
# The connection is automatically closed when the script exists. | |
# TARGET_HOST="wolever.net" | |
# setup_ssh_control_socket | |
# ssh_target "hostname" | |
debug() { | |
echo "DEBUG: $*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
nodes="-nodes" | |
if [[ "$1" == "-des" ]]; then | |
nodes="" | |
shift | |
fi | |
if [[ ! "$1" || ! "$2" || "$1" =~ "^-" ]]; then |