This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TIMESTAMP=$(date +%F) | |
sudo cp /var/log/openwrt.log /tmp/openwrt_$TIMESTAMP.log | |
subject="Openwrt Log on $(date +%F)" | |
content="Here is the log of openwrt on `date "+%B %d %Y"`: openwrt_$TIMESTAMP.log" | |
python /home/pi/run/send_mail.py "$subject" "$content" -f /tmp/openwrt_*.log | |
sudo rm /tmp/openwrt_*.log | |
logger "The log: openwrt_$TIMESTAMP.log has been sent" | |
echo "The log of openwrt `date "+%B %d %Y"`: openwrt_$TIMESTAMP.log has been sent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
zip -r ~/reaver_backup_`date +"%Y%m%d"`.zip /usr/local/etc/reaver; | |
echo 'Done zip!' | |
ssh -i /root/.ssh/id_rsa_3072 pi@192.168.31.179 <<'ENDSSH' | |
#commands to run on remote host | |
cd ~/; | |
rm reaver_backup_*.zip; | |
exit |
NewerOlder