Changed apache::sslserver to use systemd on Fedora.
This commit is contained in:
parent
2758fb1a35
commit
77decd746e
2 changed files with 36 additions and 7 deletions
15
apache/files/httpsd.service
Normal file
15
apache/files/httpsd.service
Normal 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
|
|
@ -150,12 +150,27 @@ class apache::redhat::sslserver {
|
||||||
notify => Service["httpsd"],
|
notify => Service["httpsd"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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":
|
file { "/etc/init.d/httpsd":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => "puppet:///modules/apache/httpsd",
|
source => "puppet:///modules/apache/httpsd",
|
||||||
mode => "0755",
|
mode => "0755",
|
||||||
owner => root,
|
owner => "root",
|
||||||
group => root,
|
group => "root",
|
||||||
|
before => Service["httpsd"],
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/usr/sbin/httpsd":
|
file { "/usr/sbin/httpsd":
|
||||||
|
@ -174,7 +189,6 @@ class apache::redhat::sslserver {
|
||||||
require => [ Package["httpd"],
|
require => [ Package["httpd"],
|
||||||
Package["mod_ssl"],
|
Package["mod_ssl"],
|
||||||
File["/etc/httpd/conf/httpsd.conf"],
|
File["/etc/httpd/conf/httpsd.conf"],
|
||||||
File["/etc/init.d/httpsd"],
|
|
||||||
File["/usr/sbin/httpsd"], ],
|
File["/usr/sbin/httpsd"], ],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue