blob: f1cd537d9c1b64a0a35a9181010b8dc84f875b6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
# goto root dir (this script resides in src)
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}
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}
|