diff --git a/debian/ngcp-rtpengine-daemon.postinst b/debian/ngcp-rtpengine-daemon.postinst deleted file mode 100755 index adea83891..000000000 --- a/debian/ngcp-rtpengine-daemon.postinst +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# postinst script for ngcp-rtpengine-daemon - -set -e - -restart_handler() { - if [ -x "/etc/init.d/ngcp-rtpengine-daemon" ]; then - if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then - invoke-rc.d ngcp-rtpengine-daemon restart || exit $? - else - /etc/init.d/ngcp-rtpengine-daemon restart || exit $? - fi - fi -} - -initscript_handler() { - if [ -x "/etc/init.d/ngcp-rtpengine-daemon" ]; then - update-rc.d ngcp-rtpengine-daemon defaults >/dev/null - invoke-rc.d ngcp-rtpengine-daemon 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-rtpengine-daemon" - restart_handler - else - echo "Inactive node detected, ignoring request to restart ngcp-rtpengine-daemon" - 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-rtpengine-daemon.postrm b/debian/ngcp-rtpengine-daemon.postrm deleted file mode 100755 index 969412e2e..000000000 --- a/debian/ngcp-rtpengine-daemon.postrm +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# postrm script for ngcp-rtpengine-daemon - -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-rtpengine-daemon remove >/dev/null - fi -} - -if [ "$1" = "purge" ] ; then - removal_wrapper -fi - -exit 0 diff --git a/debian/ngcp-rtpengine-daemon.prerm b/debian/ngcp-rtpengine-daemon.prerm deleted file mode 100755 index 5ee99ce00..000000000 --- a/debian/ngcp-rtpengine-daemon.prerm +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# prerm script for ngcp-rtpengine-daemon - -set -e - -stop_handler() { - if [ -x "/etc/init.d/ngcp-rtpengine-daemon" ]; then - invoke-rc.d ngcp-rtpengine-daemon stop || exit $? - fi -} - -stop_daemon() { - # just stop the service on ce systems because - # the pro system handle it as part of their monitoring/HA setup - if ! [ -x "$(which ngcp-check_active 2>/dev/null)" ]; then - stop_handler - else - case "$2" in - upgrade) - echo "Detected upgrade procedure, not stopping ngcp-rtpengine-daemon service." - ;; - remove|purge) - stop_handler - ;; - esac - fi -} - -if [ "$1" = "prerm" ] ; then - stop_daemon -fi - -exit 0