diff options
Diffstat (limited to 'bin/updateConfig.sh')
| -rwxr-xr-x | bin/updateConfig.sh | 18 |
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} |
