diff --git a/debian/ngcp-rtpengine-iptables-setup b/debian/ngcp-rtpengine-iptables-setup index 252939cb3..e4d537a09 100755 --- a/debian/ngcp-rtpengine-iptables-setup +++ b/debian/ngcp-rtpengine-iptables-setup @@ -81,7 +81,6 @@ firewall_teardown() iptables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null ip6tables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null - rmmod $MODNAME 2>/dev/null } case "$1" in diff --git a/debian/ngcp-rtpengine-kernel-dkms.prerm b/debian/ngcp-rtpengine-kernel-dkms.prerm index e58a7f13a..be28c80db 100644 --- a/debian/ngcp-rtpengine-kernel-dkms.prerm +++ b/debian/ngcp-rtpengine-kernel-dkms.prerm @@ -4,6 +4,7 @@ set -e package=ngcp-rtpengine-kernel-dkms name=ngcp-rtpengine +modname=xt_RTPENGINE version=$(dpkg-query -W -f="\${Version}" "$package" \ |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n") @@ -17,6 +18,7 @@ fi # make sure it's not running if [ -x /etc/init.d/ngcp-rtpengine-daemon ] ; then invoke-rc.d ngcp-rtpengine-daemon stop || true + rmmod "$modname" 2>/dev/null || true fi if [ "$VIRT" = "yes" ]; then