3 # thttpd-rotate - nightly script to rotate thttpd's log files on FreeBSD
5 # This goes in /etc/periodic/daily. It rotates the log files and then
6 # tells thttpd to re-open its log file.
8 cd /usr/local/www/chroot/logs
10 mv thttpd_log.6.gz thttpd_log.7.gz
11 mv thttpd_log.5.gz thttpd_log.6.gz
12 mv thttpd_log.4.gz thttpd_log.5.gz
13 mv thttpd_log.3.gz thttpd_log.4.gz
14 mv thttpd_log.2.gz thttpd_log.3.gz
15 mv thttpd_log.1.gz thttpd_log.2.gz
16 mv thttpd_log thttpd_log.1
17 kill -HUP `cat /var/run/thttpd.pid`