From 3c09cd42d030a6544ba7ac914387f496f1303bb3 Mon Sep 17 00:00:00 2001 From: David Kaufmann Date: Mon, 14 Nov 2011 00:14:31 +0100 Subject: added update-script --- bin/updateConfig.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/updateConfig.sh (limited to 'bin') diff --git a/bin/updateConfig.sh b/bin/updateConfig.sh new file mode 100755 index 0000000..05056c1 --- /dev/null +++ b/bin/updateConfig.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +HOSTFILE=~/pssh.hosts + +if [ -f ${HOSTFILE} ]; then + echo "${HOSTFILE} already exists" + exit 1 +fi + +touch ${HOSTFILE} +cat ~/.ssh/config | egrep "^Host" | sed 's/^Host //' >> ${HOSTFILE} + +echo "Fetch new load.sh" +pssh -i -h ${HOSTFILE} "rm -f load.sh && wget -q http://pluto.fsinf.at/~astra/config/load.sh && chmod +x load.sh" +echo "Apply new load.sh" +pssh -i -h ${HOSTFILE} -t 0 "./load.sh && rm load.sh" + +rm ${HOSTFILE} -- cgit v1.2.3