Annotation of embedaddon/thttpd/scripts/500.thttpd-rotate, revision 1.1.1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>