diff options
| author | David Kaufmann <astra@fsinf.at> | 2011-12-03 04:59:49 +0100 |
|---|---|---|
| committer | David Kaufmann <astra@fsinf.at> | 2011-12-03 04:59:49 +0100 |
| commit | c8ada82fd4b69330c805658f8ce9a5d09919a6b6 (patch) | |
| tree | 3a37d1c787c2d44a02198b08dabf4315162a6b27 /bin | |
| parent | 221127baa08b5ba05438b8596905c19066d94e83 (diff) | |
| download | config-c8ada82fd4b69330c805658f8ce9a5d09919a6b6.tar.gz | |
enable updating of single hosts
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/updateConfig.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/updateConfig.sh b/bin/updateConfig.sh index 533b23b..7385f2e 100755 --- a/bin/updateConfig.sh +++ b/bin/updateConfig.sh @@ -4,7 +4,11 @@ BASEDIR=`dirname $(readlink -f $0)` cd ${BASEDIR}/../ -HOSTS=`cat ~/.ssh/config | egrep "^Host" | egrep -v "nohome|noshell|offline" | sed 's/^Host //' | sed 's/ #.*//' | tr '\n' ' ' | sed 's/ $//' ` +ALLHOSTS=`cat ~/.ssh/config | egrep "^Host" | egrep -v "nohome|noshell|offline" | sed 's/^Host //' | sed 's/ #.*//' | tr '\n' ' ' | sed 's/ $//' ` +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" |
