Puppet Class: stunnel::service

Defined in:
manifests/service.pp

Overview

Manage the Stunnel Service

Author:



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'manifests/service.pp', line 6

class stunnel::service {

  file { '/etc/rc.d/init.d/stunnel':
    ensure  => 'present',
    owner   => 'root',
    group   => 'root',
    mode    => '0750',
    content => file("${module_name}/stunnel.init"),
    notify  => Exec['stunnel_chkconfig_update']
  }

  exec { 'stunnel_chkconfig_update':
    command     => '/sbin/chkconfig --del stunnel; /sbin/chkconfig --add stunnel',
    refreshonly => true,
    before      => Service['stunnel']
  }

  service { 'stunnel':
    ensure     => 'running',
    hasrestart => true,
    hasstatus  => true,
    require    => File['/etc/rc.d/init.d/stunnel'],
  }
}