puppet-standalone-mashup/shared/additional-modules/nginx-debian/manifests/init.pp
2012-02-14 07:11:25 -05:00

25 lines
478 B
Puppet

class nginx-debian {
$log_root = "/var/log/nginx"
file { $log_root:
owner => root,
group => web,
mode => 2775
}
file { "$log_root/sites":
owner => root,
group => web,
mode => 2775,
require => File[$log_root]
}
$pid_file = pid_path('nginx')
logrotate_d { 'nginx':
postrotate => "sudo /bin/kill -USR1 `cat ${pid_file}`",
pattern => "/var/log/nginx/*/access.log /var/log/nginx/*/error.log",
require => Class['nginx']
}
}