Fixes for searcher default upload terming and whitespace handling
This commit is contained in:
@@ -1,18 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
logfile=/var/log/wolfpack.log
|
||||
target='cxford@10.0.1.3'
|
||||
|
||||
echo Starting VPN and delaying 40 seconds....
|
||||
systemctl start vpn
|
||||
sleep 40
|
||||
echo | systemctl status | tee -a $logfile
|
||||
if [ "$(pgrep -afc wolfpack)" -ne 1 ]; then
|
||||
echo WolfPack is already working elsewhere.
|
||||
exit 1
|
||||
fi
|
||||
/usr/local/bin/wolfpack --alpha
|
||||
sleep 10
|
||||
rsync -avz /srv/yggdrasil/new_acquisition/* cxford@10.0.1.3:/srv/yggdrasil/new_acquisition 2>&1 | tee -a /var/log/wolfpack.log
|
||||
ls -l /srv/yggdrasil/new_acquisition | tee -a /var/log/wolfpack.log
|
||||
echo Files transferred from $(uname -n). | tee -a /var/log/wolfpack.log
|
||||
rsync -avz /srv/yggdrasil/new_acquisition/* cxford@10.0.1.3:/srv/yggdrasil/new_acquisition 2>&1 | tee -a $logfile
|
||||
ls -l /srv/yggdrasil/new_acquisition | tee -a $logfile
|
||||
echo Files transferred from $(uname -n). | tee -a $logfile
|
||||
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
|
||||
cat $logfile | ssh cxford@aninix.net "cat >> $logfile"
|
||||
rm $logfile
|
||||
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"
|
||||
scp "$i" "$target":"$cmdstring"
|
||||
done
|
||||
systemctl stop vpn
|
||||
|
||||
|
Reference in New Issue
Block a user