diff --git a/debian/control b/debian/control index f734b0a..4323274 100644 --- a/debian/control +++ b/debian/control @@ -27,6 +27,7 @@ Description: Configuration templates for rate-o-mat Package: ngcp-rate-o-mat Architecture: all +Pre-Depends: ngcp-system-tools Depends: libdbd-mysql-perl, libexception-class-perl, ngcp-templates-rate-o-mat, diff --git a/debian/ngcp-rate-o-mat.postinst b/debian/ngcp-rate-o-mat.postinst deleted file mode 100755 index a497934..0000000 --- a/debian/ngcp-rate-o-mat.postinst +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# postinst script for ngcp-rate-o-mat - -set -e - -restart_handler() { - if [ -x "/etc/init.d/ngcp-rate-o-mat" ]; then - if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then - invoke-rc.d ngcp-rate-o-mat restart || exit $? - else - /etc/init.d/ngcp-rate-o-mat restart || exit $? - fi - fi -} - -initscript_handler() { - if [ -x "/etc/init.d/ngcp-rate-o-mat" ]; then - update-rc.d ngcp-rate-o-mat defaults >/dev/null - invoke-rc.d ngcp-rate-o-mat start || exit $? - fi -} - -init_handler() { - # just invoke init script wrappers on ce systems since - # they do not provide ngcp-check_active and we don't - # have to handle inactive nodes - if ! [ -x "$(which ngcp-check_active 2>/dev/null)" ]; then - restart_handler - initscript_handler - else # do not restart daemon on inactive node in pro systems - if ngcp-check_active ; then - echo "Active node detected, restarting ngcp-rate-o-mat" - restart_handler - else - echo "Inactive node detected, ignoring request to restart ngcp-rate-o-mat" - fi - fi -} - -case "$1" in - configure) - init_handler - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/ngcp-rate-o-mat.postrm b/debian/ngcp-rate-o-mat.postrm deleted file mode 100755 index 0b56378..0000000 --- a/debian/ngcp-rate-o-mat.postrm +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# postrm script for ngcp-rate-o-mat - -set -e - -removal_wrapper() { - # remove the init script only on ce systems, as the - # the pro system handle it inside the monitoring/HA setup - if ! [ -x "$(which ngcp-check_active 2>/dev/null)" ]; then - update-rc.d ngcp-rate-o-mat remove >/dev/null - fi -} - -if [ "$1" = "purge" ] ; then - removal_wrapper -fi - -exit 0