diff options
Diffstat (limited to 'manifests/install.pp')
-rw-r--r-- | manifests/install.pp | 48 |
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, |