diff --git a/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst b/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst index eb4fd7436..66de7230c 100644 --- a/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst +++ b/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst @@ -19,7 +19,7 @@ if [ "$1" = 'configure' ] ; then # try to start the daemon if [ -x /etc/init.d/ngcp-mediaproxy-ng-daemon ] ; then - /etc/init.d/ngcp-mediaproxy-ng-daemon start || true + invoke-rc.d ngcp-mediaproxy-ng-daemon start || true fi fi diff --git a/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm b/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm index d7240aee1..61a0200c6 100644 --- a/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm +++ b/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm @@ -9,7 +9,9 @@ version=`dpkg-query -W -f='${Version}' "$package" \ |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"` # make sure it's not running -/etc/init.d/ngcp-mediaproxy-ng-daemon stop || true +if [ -x /etc/init.d/ngcp-mediaproxy-ng-daemon ] ; then + invoke-rc.d ngcp-mediaproxy-ng-daemon stop || true +fi dkms remove -m "$name" -v "$version" --all || true