/opt/tarantella/var/log/*log  /opt/tarantella/var/log/*jsl {
    su ttasys ttaserv
    weekly
    rotate 7
    missingok
    notifempty
    compress
    delaycompress
    olddir archive
    createolddir 700 ttasys ttaserv
    nodateext
    nocreate
    sharedscripts
    postrotate
        # Remove empty files
        find /opt/tarantella/var/log -type f -empty -delete
        # Tell processes to re-open log files
        auxserverpid=$(tail -1 /opt/tarantella/var/info/auxserver.pid 2>/dev/null)
        cdmserverpid=$(cat /opt/tarantella/var/info/cdmserver.pid 2>/dev/null)
        multiserverpid=$(cat /opt/tarantella/var/info/multiserver.pid 2>/dev/null)
        kill -HUP $auxserverpid 2>/dev/null
        sleep 5
        kill -USR1 $cdmserverpid 2>/dev/null
        sleep 5
        kill -HUP $multiserverpid 2>/dev/null
        sleep 5
        # Recreate print log files
        pushd /opt/tarantella/var/log >/dev/null
        touch print.log print_error.log
        chmod 600 print.log print_error.log
        chown ttasys:ttaserv print.log print_error.log
    endscript
}

/opt/tarantella/webserver/apache/default/logs/*log {
    su root ttaserv
    weekly
    rotate 7
    missingok
    notifempty
    copytruncate
    compress
    delaycompress
    olddir archive
    createolddir 770 ttaserv ttaserv
    nodateext
}

/opt/tarantella/webserver/tomcat/default/logs/catalina.out {
    su ttaserv ttaserv
    weekly
    rotate 7
    missingok
    notifempty
    copytruncate
    compress
    delaycompress
    olddir archive
    createolddir 770 ttaserv ttaserv
    nodateext
}
