summaryrefslogtreecommitdiff
path: root/puppet/modules/site_nickserver/manifests
diff options
context:
space:
mode:
authorVarac <varac@leap.se>2017-01-18 17:43:57 +0000
committerVarac <varac@leap.se>2017-01-18 17:43:57 +0000
commitd9bdd35378b0ac2e45cab92f48d41c6ea1b70cc7 (patch)
tree27016e1f44da807d690984799046c651a16e68ae /puppet/modules/site_nickserver/manifests
parent8cba23d7308af4ed018d42935adee442e2e53134 (diff)
parent7e51872c854f48eaf372a6025f4550ca801cb447 (diff)
Merge branch 'nickserver_systemd' into 'master'
Nickserver systemd See merge request !65
Diffstat (limited to 'puppet/modules/site_nickserver/manifests')
-rw-r--r--puppet/modules/site_nickserver/manifests/init.pp46
1 files changed, 15 insertions, 31 deletions
diff --git a/puppet/modules/site_nickserver/manifests/init.pp b/puppet/modules/site_nickserver/manifests/init.pp
index ad97f829..12236b3b 100644
--- a/puppet/modules/site_nickserver/manifests/init.pp
+++ b/puppet/modules/site_nickserver/manifests/init.pp
@@ -101,42 +101,26 @@ class site_nickserver {
# NICKSERVER DAEMON
#
- file {
- '/usr/bin/nickserver':
- ensure => link,
- target => '/srv/leap/nickserver/bin/nickserver',
- require => Vcsrepo['/srv/leap/nickserver'];
-
- '/etc/init.d/nickserver':
- owner => root,
- group => 0,
- mode => '0755',
- source => '/srv/leap/nickserver/dist/debian-init-script',
- require => Vcsrepo['/srv/leap/nickserver'];
+ file { '/usr/bin/nickserver':
+ ensure => link,
+ target => '/srv/leap/nickserver/bin/nickserver',
+ require => Vcsrepo['/srv/leap/nickserver'];
}
- # register initscript at systemd on nodes newer than wheezy
- # see https://leap.se/code/issues/7614
- case $::operatingsystemrelease {
- /^7.*/: { }
- default: {
- exec { 'register_systemd_nickserver':
- refreshonly => true,
- command => '/bin/systemctl enable nickserver',
- subscribe => File['/etc/init.d/nickserver'],
- before => Service['nickserver'];
- }
- }
+ ::systemd::unit_file {'nickserver.service':
+ ensure => present,
+ source => '/srv/leap/nickserver/dist/nickserver.service',
+ subscribe => Vcsrepo['/srv/leap/nickserver'],
+ require => File['/usr/bin/nickserver'];
}
service { 'nickserver':
- ensure => running,
- enable => true,
- hasrestart => true,
- hasstatus => true,
- require => [
- File['/etc/init.d/nickserver'],
- File['/usr/bin/nickserver'],
+ ensure => running,
+ provider => 'systemd',
+ enable => true,
+ require => [
+ Systemd::Unit_file['nickserver.service'],
+ Exec['systemctl-daemon-reload'],
Class['Site_config::X509::Key'],
Class['Site_config::X509::Cert'],
Class['Site_config::X509::Ca'] ];