Changed apache::sslserver to use systemd on Fedora.

This commit is contained in:
Timo Mkinen 2012-04-02 16:43:14 +03:00
parent 2758fb1a35
commit 77decd746e
2 changed files with 36 additions and 7 deletions

View file

@ -0,0 +1,15 @@
[Unit]
Description=The Apache HTTP Server (prefork MPM)
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/var/run/httpd/httpsd.pid
EnvironmentFile=/etc/sysconfig/httpsd
ExecStart=/usr/sbin/httpsd -f /etc/httpd/conf/httpsd.conf $OPTIONS -k start
ExecReload=/usr/sbin/httpsd -f /etc/httpd/conf/httpsd.conf $OPTIONS -t
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/usr/sbin/httpsd -f /etc/httpd/conf/httpsd.conf $OPTIONS -k stop
[Install]
WantedBy=multi-user.target

View file

@ -150,12 +150,27 @@ class apache::redhat::sslserver {
notify => Service["httpsd"],
}
file { "/etc/init.d/httpsd":
ensure => present,
source => "puppet:///modules/apache/httpsd",
mode => "0755",
owner => root,
group => root,
case $operatingsystem {
"fedora": {
file { "/lib/systemd/system/httpsd.service":
ensure => present,
source => "puppet:///modules/apache/httpsd.service",
mode => "0644",
owner => "root",
group => "root",
before => Service["httpsd"],
}
}
default: {
file { "/etc/init.d/httpsd":
ensure => present,
source => "puppet:///modules/apache/httpsd",
mode => "0755",
owner => "root",
group => "root",
before => Service["httpsd"],
}
}
}
file { "/usr/sbin/httpsd":
@ -174,7 +189,6 @@ class apache::redhat::sslserver {
require => [ Package["httpd"],
Package["mod_ssl"],
File["/etc/httpd/conf/httpsd.conf"],
File["/etc/init.d/httpsd"],
File["/usr/sbin/httpsd"], ],
}