{

return "# all versions in php-fpm file" unless $PHP_VERSION eq "";

$OUT = "/var/log/php/*/php*fpm.log {
    missingok
    notifempty
    sharedscripts
    delaycompress
    su root root
    create 600 root root
    postrotate
      /sbin/e-smith/service php-fpm reload >/dev/null 2>&1 || true
      for VER in 70 71 72 73 74 80 81 82 83 84 85 ; do
         /sbin/e-smith/service php${VER}-php-fpm reload >/dev/null 2>&1 || true
      done
    endscript
}

/var/log/php/*/[!php]*.log {
    missingok
    notifempty
    sharedscripts
    delaycompress
    su root www
    create 600 www www
    postrotate
      /sbin/e-smith/service php-fpm reload >/dev/null 2>&1 || true
      for VER in 70 71 72 73 74 80 81 82 83 84 85 ; do
         /sbin/e-smith/service php${VER}-php-fpm reload >/dev/null 2>&1 || true
      done
    endscript
}
";

}
