Invoking a script from Apache httpd requires escalating privileges, and
setuid does not work for scripts.
But cron.daily runs as root, and it should be enough.
Also remove unnecessary require.
This solves 2 items from https://github.com/alexpdp7/alexpdp7/issues/28
service {'apache2':
enable => true,
ensure => running,
- require => File['/usr/local/bin/notify_md_renewal'],
}
$apache_dep = {
MDomain $base_hostname auto
MDCertificateAgreement accepted
MDContactEmail $mail
- MDNotifyCmd /usr/local/bin/notify_md_renewal
<VirtualHost *:443>
ServerName $base_hostname
* => $apache_dep
}
- file {'/usr/local/bin/notify_md_renewal':
+ file {'/etc/cron.daily/renew_md_certificates':
content => @("EOT"/$)
#!/bin/sh
done
| EOT
,
- mode => '4755',
+ mode => '0755',
}
service {'nagios':}