From 051a8bddf795ee2109862b4cf149bde23d614fed Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 25 Sep 2024 17:43:18 -0400 Subject: [PATCH] add disconnect script --- disconnect | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 disconnect diff --git a/disconnect b/disconnect new file mode 100755 index 0000000..c7bf839 --- /dev/null +++ b/disconnect @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit -o nounset -o pipefail + +[[ $# -eq 0 ]] || exit 1 + +. hosts.sh + +for host in ${hosts_all[@]}; do + echo $host + echo + + ssh root@$host -O exit || true + + echo +done