2016-08-04 12:08:16 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-09-23 16:42:15 -05:00
|
|
|
if [ "$(pgrep -afc wolfpack)" -ne 1 ]; then
|
|
|
|
echo WolfPack is already working elsewhere.
|
|
|
|
exit 1
|
|
|
|
fi
|
2016-08-04 12:08:16 -05:00
|
|
|
/usr/local/bin/wolfpack --alpha
|
|
|
|
sleep 10
|
|
|
|
rsync -avz /srv/yggdrasil/new_acquisition/* cxford@10.0.1.3:/srv/yggdrasil/new_acquisition &>>/var/log/wolfpack.log
|
|
|
|
ls -l /srv/yggdrasil/new_acquisition >> /var/log/wolfpack.log
|
|
|
|
echo Files transferred from $(uname -n). >> /var/log/wolfpack.log
|
|
|
|
rm -Rf /srv/yggdrasil/new_acquisition/*
|
|
|
|
cat /var/log/wolfpack.log | ssh cxford@aninix.net "cat >> /var/log/wolfpack.log"
|
|
|
|
rm /var/log/wolfpack.log
|
|
|
|
for i in $(ls /usr/local/etc/WolfPack/*.pup); do
|
|
|
|
export cmdstring="$(echo $i | sed "s/pup/$(uname -n)/")"
|
|
|
|
scp "$i" cxford@aninix.net:"$cmdstring"
|
|
|
|
done
|