24 lines
748 B
Bash
24 lines
748 B
Bash
#!/bin/bash
|
|
|
|
if [ $# -gt 0 ]; then
|
|
for h in $*; do
|
|
hosts="$hosts `dig +short +search $h`"
|
|
done
|
|
else
|
|
hosts=`awk '/^[0-9]+.*# # Linux/ { print $2; }' /usr/local/bb/etc/bb-hosts`
|
|
fi
|
|
|
|
for h in $hosts ; do
|
|
echo "$h (`host $h | awk '{print $5;}'`)"
|
|
scp /usr/local/operations/linux/evault/Agent-Linux-latest.tar.gz $h:
|
|
ssh -qT $h <<EOF
|
|
tar zxvpCf /tmp Agent-Linux-latest.tar.gz
|
|
(
|
|
cd /tmp/Agent+WCC-6.73.3196-Linux-i386-stdc++v3_6
|
|
echo n > no
|
|
./install.sh -s -D < no
|
|
)
|
|
rm -rf /tmp/Agent+WCC-6.73.3196-Linux-i386-stdc++v3_6
|
|
rm -f Agent-Linux-latest.tar.gz
|
|
EOF
|
|
done |