Selectively enable/disable kannel/esme
Note that a repo refresh of rccn will trigger and esme-restart but if we are using kannel the link in /etc/service will not exist so there will be no restart.
This commit is contained in:
parent
01908da55d
commit
0c8f78698a
2 changed files with 42 additions and 2 deletions
|
@ -263,7 +263,8 @@ schedule { 'repo':
|
|||
notify => [ Exec['locale-gen'],
|
||||
Exec['notify-freeswitch'],
|
||||
Exec['restart-rapi'],
|
||||
Exec['restart-smpp'] ],
|
||||
Exec['restart-smpp'],
|
||||
Exec['restart-esme'] ],
|
||||
}
|
||||
|
||||
vcsrepo { '/var/meas_web':
|
||||
|
@ -351,6 +352,10 @@ schedule { 'repo':
|
|||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { 'restart-esme':
|
||||
command => '/usr/bin/sv restart esme',
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
if $operatingsystem == 'Ubuntu' {
|
||||
file { '/var/lib/locales/supported.d/local':
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
# Sample Usage:
|
||||
#
|
||||
class rhizo_base::runit {
|
||||
|
||||
$use_kannel = $rhizo_base::use_kannel
|
||||
|
||||
file { '/etc/sv':
|
||||
ensure => directory,
|
||||
source => 'puppet:///modules/rhizo_base/etc/sv',
|
||||
|
@ -25,6 +28,12 @@ class rhizo_base::runit {
|
|||
source => 'puppet:///modules/rhizo_base/osmo-nitb.run.kannel',
|
||||
require => File['/etc/sv'],
|
||||
}
|
||||
|
||||
service { 'kannel':
|
||||
enable => true,
|
||||
require => Package['kannel'],
|
||||
notify => [ Exec['stop-esme'], Exec['start-kannel'] ],
|
||||
}
|
||||
}
|
||||
|
||||
if $use_kannel == 'no' {
|
||||
|
@ -39,6 +48,13 @@ class rhizo_base::runit {
|
|||
ensure => link,
|
||||
target => '/etc/sv/esme',
|
||||
require => File['/etc/sv'],
|
||||
notify => [ Exec['stop-kannel'], Exec['start-esme'] ],
|
||||
}
|
||||
|
||||
exec { 'disable-kannel':
|
||||
notify => Exec['stop-kannel'],
|
||||
command => '/usr/sbin/update-rc.d kannel disable',
|
||||
require => Package['kannel'],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,4 +104,23 @@ class rhizo_base::runit {
|
|||
require => [ File['/etc/sv'], Package['websocketd'] ],
|
||||
}
|
||||
|
||||
exec { 'start-esme':
|
||||
command => '/usr/bin/sv start esme',
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { 'stop-esme':
|
||||
command => '/usr/bin/sv stop esme',
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { 'start-kannel':
|
||||
command => '/etc/init.d/kannel start',
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { 'stop-kannel':
|
||||
command => '/etc/init.d/kannel stop',
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue