Last active
September 28, 2022 04:06
-
-
Save jessenich/14ebcc075da3701dc3ac232ad8e4864b to your computer and use it in GitHub Desktop.
FreeDNS & LogRotate Example
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
# Cron example for gl11314.my.to - will update on 5 minute intervals. Works for mac, linux (or any | |
# OS with a cron scheduler) | |
# If you're not familiar with the cron scheduler, you can search for "install a cron", cron is the standard scheduler available on most non-windows systems, mac's, | |
# routers, NAS boxes and so on Using IPv4 transport | |
# Test on the console using ..: | |
# curl http://sync.afraid.org/u/VRgFyLDqz4GeCXUqAmuxLLwZ/ | |
# To install into cron, on the console enter: crontab -e | |
# Then paste in the 2 lines at the bottom of this page, then save You can check the | |
# "/tmp/freedns_gl11314_my_to.log" file on your system to verify its happening each 5 minutes | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin | |
0,5,10,15,20,25,30,35,40,45,50,55 * * * * sleep 7 ; curl -s http://sync.afraid.org/u/token/ >> /var/log/freedns_gl11314_my_to.log 2>/dev/null | |
0,5,10,15,20,25,30,35,40,45,50,55 * * * * sleep 7 ; curl -s http://sync6.afraid.org/u/token/ >> /var/log/freedns_gl11314_my_to.log 2>/dev/null |
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
/var/log/freedns_gl11314_my_to.log | |
{ | |
rotate 1 | |
weekly | |
missingok | |
notifempty | |
compress | |
delaycompress | |
sharedscripts | |
postrotate | |
[ -x /usr/lib/rsyslog/rsyslog-rotate ] && /usr/lib/rsyslog/rsyslog-rotate || true | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment