hughesjr / rpms / docker

Forked from rpms/docker 4 years ago
Clone

Blame SOURCES/docker-logrotate.sh

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