diff options
| author | David Kaufmann <astra@fsinf.at> | 2011-12-03 04:44:25 +0100 |
|---|---|---|
| committer | David Kaufmann <astra@fsinf.at> | 2011-12-03 04:44:25 +0100 |
| commit | 221127baa08b5ba05438b8596905c19066d94e83 (patch) | |
| tree | df92214dbcb0572652d8bc5d04c2a068b0e916cd /bin | |
| parent | c6768bd75bc9162951f3c6f81d3164d76b5d8d7c (diff) | |
| download | config-221127baa08b5ba05438b8596905c19066d94e83.tar.gz | |
updated config script
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/updateConfig.sh | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/bin/updateConfig.sh b/bin/updateConfig.sh index f1cd537..533b23b 100755 --- a/bin/updateConfig.sh +++ b/bin/updateConfig.sh @@ -4,19 +4,9 @@ BASEDIR=`dirname $(readlink -f $0)` cd ${BASEDIR}/../ -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} +HOSTS=`cat ~/.ssh/config | egrep "^Host" | egrep -v "nohome|noshell|offline" | sed 's/^Host //' | sed 's/ #.*//' | tr '\n' ' ' | sed 's/ $//' ` 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" +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 -h ${HOSTFILE} -t 0 "./load.sh && rm load.sh" - -rm ${HOSTFILE} +pssh -i --host "$HOSTS" -t 0 "./load.sh && rm load.sh" |
