diff --git a/debian/control b/debian/control index 6c2ca78..9ea17e1 100644 --- a/debian/control +++ b/debian/control @@ -7,30 +7,11 @@ Build-Depends: debhelper (>= 9~), Standards-Version: 3.9.7 Homepage: http://sipwise.com/ -Package: ngcp-templates-ce-rate-o-mat -Architecture: all -Depends: ${misc:Depends}, - ${shlibs:Depends} -Conflicts: ngcp-templates-pro-rate-o-mat -Provides: ngcp-templates-rate-o-mat -Description: Configuration templates for rate-o-mat - Config file templates for the rate-o-mat rating daemon. - -Package: ngcp-templates-pro-rate-o-mat -Architecture: all -Depends: ${misc:Depends}, - ${shlibs:Depends} -Conflicts: ngcp-templates-ce-rate-o-mat -Provides: ngcp-templates-rate-o-mat -Description: Configuration templates for rate-o-mat - Config file templates for the rate-o-mat rating daemon. - Package: ngcp-rate-o-mat Architecture: all Depends: libdbd-mysql-perl, libexception-class-perl, libnetaddr-ip-perl, - ngcp-templates-rate-o-mat, perl-modules, ${misc:Depends}, ${shlibs:Depends} diff --git a/debian/ngcp-templates-ce-rate-o-mat.install b/debian/ngcp-templates-ce-rate-o-mat.install deleted file mode 100644 index fd4ab96..0000000 --- a/debian/ngcp-templates-ce-rate-o-mat.install +++ /dev/null @@ -1 +0,0 @@ -ce/etc etc/ngcp-config/templates/ diff --git a/debian/ngcp-templates-pro-rate-o-mat.install b/debian/ngcp-templates-pro-rate-o-mat.install deleted file mode 100644 index 04a584b..0000000 --- a/debian/ngcp-templates-pro-rate-o-mat.install +++ /dev/null @@ -1 +0,0 @@ -pro/etc etc/ngcp-config/templates/ diff --git a/debian/rules b/debian/rules index 0361448..929653e 100755 --- a/debian/rules +++ b/debian/rules @@ -9,18 +9,7 @@ override_dh_clean: dh_clean - rm -rf pro ce rate-o-mat - -override_dh_auto_build: - mkdir -p pro/etc/default ce/etc/default - tpage --define PRO=true ngcp-rate-o-mat.default.tt2 \ - > pro/etc/default/ngcp-rate-o-mat.tt2 - tpage ngcp-rate-o-mat.default.tt2 \ - > ce/etc/default/ngcp-rate-o-mat.tt2 - tpage --define PRO=true ngcp-rate-o-mat.services \ - > pro/etc/default/ngcp-rate-o-mat.services - tpage ngcp-rate-o-mat.services \ - > ce/etc/default/ngcp-rate-o-mat.services + rm -rf rate-o-mat override_dh_auto_install: install -m 755 rate-o-mat.pl rate-o-mat diff --git a/ngcp-rate-o-mat.default.tt2 b/ngcp-rate-o-mat.default.tt2 deleted file mode 100644 index 82adc10..0000000 --- a/ngcp-rate-o-mat.default.tt2 +++ /dev/null @@ -1,73 +0,0 @@ -[% TAGS [- -] -%] -[% PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname'; hostname = out -%] -[% - argv.host=hostname; argv.role='proxy'; - PROCESS '/usr/lib/ngcp-ngcpcfg/has_role'; - is_proxy = out --%] -# Options for the NGCP rate-o-mat -[% IF is_proxy -%] -RATEOMAT_RUN=[% rateomat.enable %] -[% ELSE -%] -# no proxy role -RATEOMAT_RUN="no" -[% END -%] -RATEOMAT_DEBUG=0 - -[% IF rateomat.daemonize == "no" -%] -RATEOMAT_DAEMONIZE=0 -[% ELSE -%] -RATEOMAT_DAEMONIZE=1 -[% END -%] - -# how long we shall sleep before looking for unrated CDRs again -RATEOMAT_LOOP_INTERVAL=[% rateomat.loopinterval %] - -# whether we should split CDRs on peaktime borders -RATEOMAT_SPLIT_PEAK_PARTS=[% rateomat.splitpeakparts %] - -# db reconnect options -RATEOMAT_DB_RECONNECT_RETRIES=9999 -RATEOMAT_DB_RECONNECT_INTERVAL=5 -RATEOMAT_DB_RECONNECT_TIMEOUT=3 -RATEOMAT_DB_TXN_RETRIES=100 -RATEOMAT_DB_PRINT_ERROR=0 - -# billing database -RATEOMAT_BILLING_DB_HOST='[% database.central.dbhost %]' -RATEOMAT_BILLING_DB_PORT='[% database.central.dbport %]' -RATEOMAT_BILLING_DB_NAME='[% rateomat.billingdb.name %]' -RATEOMAT_BILLING_DB_USER='[% rateomat.billingdb.user %]' -RATEOMAT_BILLING_DB_PASS='[% rateomat.billingdb.pass %]' - -# accounting database -RATEOMAT_ACCOUNTING_DB_HOST='[% database.pair.dbhost %]' -RATEOMAT_ACCOUNTING_DB_PORT='[% database.pair.dbport %]' -RATEOMAT_ACCOUNTING_DB_NAME='[% rateomat.accountingdb.name %]' -RATEOMAT_ACCOUNTING_DB_USER='[% rateomat.accountingdb.user %]' -RATEOMAT_ACCOUNTING_DB_PASS='[% rateomat.accountingdb.pass %]' - -# provisioning database -RATEOMAT_PROVISIONING_DB_HOST='[% database.pair.dbhost %]' -RATEOMAT_PROVISIONING_DB_PORT='[% database.pair.dbport %]' -RATEOMAT_PROVISIONING_DB_NAME='[% rateomat.provisioningdb.name %]' -RATEOMAT_PROVISIONING_DB_USER='[% rateomat.provisioningdb.user %]' -RATEOMAT_PROVISIONING_DB_PASS='[% rateomat.provisioningdb.pass %]' - -# duplication database -[% IF database.central.dbhost != database.pair.dbhost -%] -RATEOMAT_DUPLICATE_DB_HOST='[% database.central.dbhost %]' -RATEOMAT_DUPLICATE_DB_PORT='[% database.central.dbport %]' -RATEOMAT_DUPLICATE_DB_NAME='[% rateomat.accountingdb.name %]' -RATEOMAT_DUPLICATE_DB_USER='[% rateomat.accountingdb.user %]' -RATEOMAT_DUPLICATE_DB_PASS='[% rateomat.accountingdb.pass %]' -[% ELSE -%] -RATEOMAT_DUPLICATE_DB_HOST='' -RATEOMAT_DUPLICATE_DB_PORT='' -RATEOMAT_DUPLICATE_DB_NAME='' -RATEOMAT_DUPLICATE_DB_USER='' -RATEOMAT_DUPLICATE_DB_PASS='' -[% END -%] - -# export all settings to rate-o-mat's environment -export RATEOMAT_RUN RATEOMAT_DAEMONIZE RATEOMAT_LOOP_INTERVAL RATEOMAT_SPLIT_PEAK_PARTS RATEOMAT_BILLING_DB_NAME RATEOMAT_BILLING_DB_HOST RATEOMAT_BILLING_DB_PORT RATEOMAT_BILLING_DB_USER RATEOMAT_BILLING_DB_PASS RATEOMAT_PROVISIONING_DB_NAME RATEOMAT_PROVISIONING_DB_HOST RATEOMAT_PROVISIONING_DB_PORT RATEOMAT_PROVISIONING_DB_USER RATEOMAT_PROVISIONING_DB_PASS RATEOMAT_ACCOUNTING_DB_NAME RATEOMAT_ACCOUNTING_DB_HOST RATEOMAT_ACCOUNTING_DB_PORT RATEOMAT_ACCOUNTING_DB_USER RATEOMAT_ACCOUNTING_DB_PASS RATEOMAT_DB_RECONNECT_RETRIES RATEOMAT_DB_RECONNECT_INTERVAL RATEOMAT_DB_RECONNECT_TIMEOUT RATEOMAT_DB_TXN_RETRIES RATEOMAT_DB_PRINT_ERROR RATEOMAT_DEBUG RATEOMAT_DUPLICATE_DB_HOST RATEOMAT_DUPLICATE_DB_PORT RATEOMAT_DUPLICATE_DB_NAME RATEOMAT_DUPLICATE_DB_USER RATEOMAT_DUPLICATE_DB_PASS diff --git a/ngcp-rate-o-mat.services b/ngcp-rate-o-mat.services deleted file mode 100644 index 1ecf76d..0000000 --- a/ngcp-rate-o-mat.services +++ /dev/null @@ -1,10 +0,0 @@ -[% TAGS [- -] %] -#!/bin/bash -[- IF PRO -] -ngcp-check_active > /dev/null -if [ "$?" == "0" ]; then - monit restart rate-o-mat -fi -[- ELSE -] -/etc/init.d/ngcp-rate-o-mat restart -[- END -]