tryzealot/zealot

View on GitHub
docker/rootfs/etc/cont-init.d/12-logrotate

Summary

Maintainability
Test Coverage
#!/usr/bin/with-contenv sh

if [[ ! -f /mnt/config/etc/logrotate.conf ]]; then
  if [[ ! -d /mnt/config/etc ]]; then
    mkdir -p /mnt/config/etc
  fi

  cp /etc/logrotate.conf /mnt/config/etc/logrotate.conf
fi

if [[ ! -d /mnt/config/etc/logrotate.d ]]; then
  mkdir -p /mnt/config/etc/logrotate.d
  cp /etc/logrotate.d/* /mnt/config/etc/logrotate.d/
fi