hughesjr / rpms / docker

Forked from rpms/docker 4 years ago
Clone

Blame SOURCES/docker-logrotate.sh

b215bf
#!/bin/sh
b215bf
b215bf
LOGROTATE=true
b215bf
[ -f /etc/sysconfig/docker ] && source /etc/sysconfig/docker
b215bf
b215bf
if [ $LOGROTATE == true ]; then
b215bf
    for id in $(docker ps -q); do
311a84
        exec $(docker exec $id logrotate -s /var/log/logstatus /etc/logrotate.conf > /dev/null 2>&1)
b215bf
    done
b215bf
fi
b215bf
exit 0