summaryrefslogtreecommitdiff
path: root/manifests/install.pp
diff options
context:
space:
mode:
authorHendrik Jäger <gitcommit@henk.geekmail.org>2022-06-26 22:34:39 +0200
committerHendrik Jäger <gitcommit@henk.geekmail.org>2022-07-25 23:53:04 +0200
commit54da0fea16fe96e031150a7f87de4567aa6ddc0b (patch)
tree9d62241cbb17a502f237dd4137a098d683db2ed8 /manifests/install.pp
parent72b29d02cb6a7007944f81e0fb354f5ba833ed2f (diff)
work with systemd
Diffstat (limited to 'manifests/install.pp')
-rw-r--r--manifests/install.pp48
1 files changed, 31 insertions, 17 deletions
diff --git a/manifests/install.pp b/manifests/install.pp
index 9609076..f683aad 100644
--- a/manifests/install.pp
+++ b/manifests/install.pp
@@ -5,23 +5,6 @@ class s6::install {
;
}
file {
- '/usr/local/bin/s6-svscanboot':
- ensure => present,
- source => [
- "puppet:///modules/s6/usr/local/bin/s6-svscanboot.${facts['os']['distro']['codename']}",
- 'puppet:///modules/s6/usr/local/bin/s6-svscanboot',
- ],
- mode => '0755',
- require => Package['s6'],
- notify => Class['s6::service'],
- ;
- '/etc/init.d/s6':
- ensure => present,
- source => 'puppet:///modules/s6/etc/init.d/s6',
- mode => '0755',
- require => Package['s6'],
- notify => Class['s6::service'],
- ;
'/etc/s6-services/':
ensure => directory,
;
@@ -32,6 +15,37 @@ class s6::install {
ensure => directory,
;
}
+
+ if $facts['service_provider'] == 'systemd' {
+ file {
+ '/etc/systemd/system/s6.service':
+ ensure => present,
+ source => 'puppet:///modules/s6/etc/systemd/system/s6.service',
+ require => Package['s6'],
+ notify => Class['s6::service'],
+ ;
+ }
+ } else {
+ file {
+ '/usr/local/bin/s6-svscanboot':
+ ensure => present,
+ source => [
+ "puppet:///modules/s6/usr/local/bin/s6-svscanboot.${facts['os']['distro']['codename']}",
+ 'puppet:///modules/s6/usr/local/bin/s6-svscanboot',
+ ],
+ mode => '0755',
+ require => Package['s6'],
+ notify => Class['s6::service'],
+ ;
+ '/etc/init.d/s6':
+ ensure => present,
+ source => 'puppet:///modules/s6/etc/init.d/s6',
+ mode => '0755',
+ require => Package['s6'],
+ notify => Class['s6::service'],
+ ;
+ }
+ }
user {
's6-logs':
ensure => present,