diff --git a/debian/ngcp-rtpengine-daemon.init b/debian/ngcp-rtpengine-daemon.init index 5e483225a..dad43edd3 100755 --- a/debian/ngcp-rtpengine-daemon.init +++ b/debian/ngcp-rtpengine-daemon.init @@ -136,7 +136,7 @@ fi case "$1" in start) set +e - if [ -x "/usr/sbin/ngcp-check-active" ]; then + if [ -x "$(which ngcp-check-active)" ]; then case "$(ngcp-check-active -v)" in active|transition) log_action_msg "Active node or transition." diff --git a/debian/ngcp-rtpengine-daemon.postinst b/debian/ngcp-rtpengine-daemon.postinst index 60e584dcf..b42e00f5a 100644 --- a/debian/ngcp-rtpengine-daemon.postinst +++ b/debian/ngcp-rtpengine-daemon.postinst @@ -5,8 +5,8 @@ set -e default=/etc/default/ngcp-rtpengine-daemon modname=xt_RTPENGINE -if [ -x /usr/sbin/ngcp-virt-identify ]; then - if /usr/sbin/ngcp-virt-identify --type container; then +if [ -x "$(which ngcp-virt-identify)" ]; then + if ngcp-virt-identify --type container; then VIRT="yes" fi fi diff --git a/debian/ngcp-rtpengine-iptables-setup b/debian/ngcp-rtpengine-iptables-setup index 7764b2c13..252939cb3 100755 --- a/debian/ngcp-rtpengine-iptables-setup +++ b/debian/ngcp-rtpengine-iptables-setup @@ -31,8 +31,8 @@ fi ### -if [ -x /usr/sbin/ngcp-virt-identify ]; then - if /usr/sbin/ngcp-virt-identify --type container; then +if [ -x "$(which ngcp-virt-identify)" ]; then + if ngcp-virt-identify --type container; then VIRT="yes" fi fi diff --git a/debian/ngcp-rtpengine-kernel-dkms.postinst b/debian/ngcp-rtpengine-kernel-dkms.postinst index 3d7694a32..21e008032 100644 --- a/debian/ngcp-rtpengine-kernel-dkms.postinst +++ b/debian/ngcp-rtpengine-kernel-dkms.postinst @@ -9,8 +9,8 @@ version=$(dpkg-query -W -f="\${Version}" "$package" \ |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n") -if [ -x /usr/sbin/ngcp-virt-identify ]; then - if /usr/sbin/ngcp-virt-identify --type container; then +if [ -x "$(which ngcp-virt-identify)" ]; then + if ngcp-virt-identify --type container; then VIRT="yes" fi fi diff --git a/debian/ngcp-rtpengine-kernel-dkms.prerm b/debian/ngcp-rtpengine-kernel-dkms.prerm index 0cf711ad8..e58a7f13a 100644 --- a/debian/ngcp-rtpengine-kernel-dkms.prerm +++ b/debian/ngcp-rtpengine-kernel-dkms.prerm @@ -8,8 +8,8 @@ name=ngcp-rtpengine version=$(dpkg-query -W -f="\${Version}" "$package" \ |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n") -if [ -x /usr/sbin/ngcp-virt-identify ]; then - if /usr/sbin/ngcp-virt-identify --type container; then +if [ -x "$(which ngcp-virt-identify)" ]; then + if ngcp-virt-identify --type container; then VIRT="yes" fi fi diff --git a/debian/ngcp-rtpengine-recording-daemon.init b/debian/ngcp-rtpengine-recording-daemon.init index b36e7901e..3bed33f8e 100755 --- a/debian/ngcp-rtpengine-recording-daemon.init +++ b/debian/ngcp-rtpengine-recording-daemon.init @@ -67,7 +67,7 @@ fi case "$1" in start) set +e - if [ -x "/usr/sbin/ngcp-check-active" ]; then + if [ -x "$(which ngcp-check-active)" ]; then case "$(ngcp-check-active -v)" in active|transition) log_action_msg "Active node or transition."