Last active
October 6, 2015 11:04
-
-
Save duchenpaul/8fdc02240c1120d312e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment