Logrotate

    /home/www-data/logs/apache2/*.log {
            daily
            missingok
            rotate 31
            notifempty
            create 640 root
            sharedscripts
            postrotate
                    if /etc/init.d/apache2 status > /dev/null ; then \
                        /etc/init.d/apache2 reload > /dev/null; \
                    fi;
            endscript
            prerotate
                    if [ -d /etc/logrotate.d/www-data-prerotate ]; then \
                            run-parts /etc/logrotate.d/www-data-prerotate; \
                    fi; \
            endscript
    }
     
    /home/www-data/www/storage/abonnel.fr/cloud/data/nextcloud.log {
            su www-data www-data
            daily
            missingok
            rotate 2
            notifempty
            create 640 www-data
            sharedscripts
    }
     
    /home/www-data/logs/load/load.log {
            su www-data www-data
            daily
            missingok
            rotate 3
            notifempty
            create 640 www-data
            sharedscripts
    }
     
    /home/www-data/logs/certbot/certbot.log {
            su www-data www-data
            daily
            missingok
            rotate 30
            notifempty
            create 640 www-data
            sharedscripts
    }
  • informatique/logrotate/start.txt
  • Dernière modification: 2017/10/19 19:14
  • par Cedric ABONNEL