summaryrefslogtreecommitdiff
path: root/bin/updateConfig.sh
diff options
context:
space:
mode:
authorDavid Kaufmann <astra@ionic.at>2015-11-19 03:06:34 +0100
committerDavid Kaufmann <astra@ionic.at>2015-12-01 03:50:30 +0100
commit42a5e0346f94887cd2daa4e54e23b69cf9c5e8db (patch)
tree8081ea94d0ee210ce918cff78926448a52102c5f /bin/updateConfig.sh
parented96d254fb206d167437730319f9de7b58589e02 (diff)
downloadconfig-42a5e0346f94887cd2daa4e54e23b69cf9c5e8db.tar.gz
redo autoupdater
Diffstat (limited to 'bin/updateConfig.sh')
-rwxr-xr-xbin/updateConfig.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/updateConfig.sh b/bin/updateConfig.sh
index 571bc4d..29c0949 100755
--- a/bin/updateConfig.sh
+++ b/bin/updateConfig.sh
@@ -4,13 +4,18 @@
BASEDIR=`dirname $(readlink -f $0)`
cd ${BASEDIR}/../
-ALLHOSTS=`cat ~/.ssh/config | egrep "^Host" | egrep -v "nohome|noshell|localnet|offline" | sed 's/^Host //' | sed 's/ #.*//' | tr '\n' ' ' | sed 's/ $//' `
+#ALLHOSTS=`cat ~/.ssh/config | egrep "^Host" | egrep -v "nohome|noshell|localnet|offline" | sed 's/^Host //' | sed 's/ #.*//' | tr '\n' ' ' | sed 's/ $//' `
+ALLHOSTS=`cat ~/.ssh/config | egrep "^Host" | egrep -v "nohome|noshell|noconfig|localnet|offline|\!|\*|\+" | sed 's/^Host \([^ ]*\).*/\1/'`
HOSTS=${HOSTS:-$ALLHOSTS}
echo "loaded keys:"
ssh-add -l
-echo "Fetch new load.sh"
-pssh -i --host "$HOSTS" "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 --host "$HOSTS" -t 0 "./load.sh && rm load.sh"
+echo "updated hosts:"
+echo $HOSTS
+
+echo "waiting 10 seconds"
+sleep 10
+
+echo "Run new load.sh"
+pssh -i --host "$HOSTS" -t 120 "rm -f load.sh ; wget -q https://pluto.fsinf.at/~astra/config/load.sh -O- -o/dev/null | bash"