SMS: Add a switch to use_kannel (or not)
If we don't use kannel, then create the runit link in /etc/service to run the python esme.
This commit is contained in:
parent
44fff5a761
commit
7d506eb4be
7 changed files with 37 additions and 0 deletions
4
modules/rhizo_base/files/etc/sv/esme/log/run
Executable file
4
modules/rhizo_base/files/etc/sv/esme/log/run
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
LOG_FOLDER=/var/log/esme
|
||||
mkdir -p $LOG_FOLDER
|
||||
exec svlogd -tt $LOG_FOLDER
|
3
modules/rhizo_base/files/etc/sv/esme/run
Executable file
3
modules/rhizo_base/files/etc/sv/esme/run
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
export PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn
|
||||
exec python /var/rhizomatica/rccn/esme.py
|
4
modules/rhizo_base/files/osmo-nitb.run
Executable file
4
modules/rhizo_base/files/osmo-nitb.run
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
ulimit -c unlimited
|
||||
exec 2>&1
|
||||
exec chrt 10 /usr/bin/osmo-nitb -C -P -m -c /etc/osmocom/osmo-nitb.cfg -l /var/lib/osmocom/hlr.sqlite3
|
|
@ -90,6 +90,7 @@ class rhizo_base {
|
|||
$kannel_port = hiera('rhizo::kannel_port')
|
||||
$kannel_username = hiera('rhizo::kannel_username')
|
||||
$kannel_sendsms_password = hiera('rhizo::kannel_sendsms_password')
|
||||
$use_kannel = hiera('rhizo::use_kannel', 'yes')
|
||||
|
||||
# VOIP provider
|
||||
$voip_provider_name = hiera('rhizo::voip_provider_name')
|
||||
|
|
|
@ -18,6 +18,30 @@ class rhizo_base::runit {
|
|||
require => Class['rhizo_base::packages'],
|
||||
}
|
||||
|
||||
if $use_kannel == 'yes' {
|
||||
|
||||
file { '/etc/sv/osmo-nitb/run':
|
||||
ensure => present,
|
||||
source => 'puppet:///modules/rhizo_base/osmo-nitb.run.kannel',
|
||||
require => File['/etc/sv'],
|
||||
}
|
||||
}
|
||||
|
||||
if $use_kannel == 'no' {
|
||||
|
||||
file { '/etc/sv/osmo-nitb/run':
|
||||
ensure => present,
|
||||
source => 'puppet:///modules/rhizo_base/osmo-nitb.run',
|
||||
require => File['/etc/sv'],
|
||||
}
|
||||
|
||||
file { '/etc/service/esme':
|
||||
ensure => link,
|
||||
target => '/etc/sv/esme',
|
||||
require => File['/etc/sv'],
|
||||
}
|
||||
}
|
||||
|
||||
file { '/etc/service/osmo-nitb':
|
||||
ensure => link,
|
||||
target => '/etc/sv/osmo-nitb',
|
||||
|
|
|
@ -56,6 +56,7 @@ kannel_server = '<%= @kannel_server %>'
|
|||
kannel_port = <%= @kannel_port %>
|
||||
kannel_username = '<%= @kannel_username %>'
|
||||
kannel_password = '<%= @kannel_sendsms_password %>'
|
||||
use_kannel = '<%= @use_kannel %>'
|
||||
|
||||
# VOIP provider
|
||||
voip_provider_name = "<%= @voip_provider_name %>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue