You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rtpengine/debian/ngcp-rtpengine-kernel-dkms....

40 lines
799 B

#!/bin/sh
set -e
package=ngcp-rtpengine-kernel-dkms
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
VIRT="yes"
fi
fi
if [ "$VIRT" = "yes" ]; then
echo "Container environment detected. Skip dkms"
else
isadded=`dkms status -m "$name" -v "$version"`
if [ "x${isadded}" = "x" ] ; then
dkms add -m "$name" -v "$version"
fi
if [ "$1" = 'configure' ] ; then
dkms build -m "$name" -v "$version" && dkms install -m "$name" -v "$version" || true
# try to start the daemon
if [ -x /etc/init.d/ngcp-rtpengine-daemon ] ; then
invoke-rc.d ngcp-rtpengine-daemon restart || true
fi
fi
fi
#DEBHELPER#
exit 0