summaryrefslogtreecommitdiff
path: root/bin/updateConfig.sh
diff options
context:
space:
mode:
authorDavid Kaufmann <astra@fsinf.at>2011-11-14 00:14:31 +0100
committerDavid Kaufmann <astra@fsinf.at>2011-11-14 00:14:31 +0100
commit3c09cd42d030a6544ba7ac914387f496f1303bb3 (patch)
tree23897fb4d118985e17de983e3c7e6b58b68332c6 /bin/updateConfig.sh
parent14d64785aaac4bb792f31c2fafb7332b74612c9f (diff)
downloadconfig-3c09cd42d030a6544ba7ac914387f496f1303bb3.tar.gz
added update-script
Diffstat (limited to 'bin/updateConfig.sh')
-rwxr-xr-xbin/updateConfig.sh18
1 files changed, 18 insertions, 0 deletions
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}