diff --git a/debian/control b/debian/control index ac701a2d6..d84c121c8 100644 --- a/debian/control +++ b/debian/control @@ -51,7 +51,8 @@ Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/kamailio/?op=log Package: ngcp-kamailio Architecture: any Multi-Arch: foreign -Pre-Depends: ${misc:Pre-Depends} +Pre-Depends: ngcp-system-tools, + ${misc:Pre-Depends} Depends: adduser, python, ${misc:Depends}, diff --git a/debian/kamailio-lb.init b/debian/kamailio-lb.init index 85bbd2539..1781c84bc 100644 --- a/debian/kamailio-lb.init +++ b/debian/kamailio-lb.init @@ -112,16 +112,20 @@ PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`)) [ -z "$USER" ] && USER=kamailio [ -z "$GROUP" ] && GROUP=kamailio -if test "$DUMP_CORE" = "yes" ; then - # set proper ulimit - ulimit -c unlimited -fi +if /usr/sbin/ngcp-virt-identify --type container; then + echo "container environment detected. Skip ulimit commands" +else + if test "$DUMP_CORE" = "yes" ; then + # set proper ulimit + ulimit -c unlimited + fi -# raise memlock limit, otherwise mysql client fails to initialize -ulimit -l unlimited -# raise file descriptors limit, otherwise we get "Can't send -# command to RTP proxy" on massive number of calls with RTP -ulimit -n 16384 + # raise memlock limit, otherwise mysql client fails to initialize + ulimit -l unlimited + # raise file descriptors limit, otherwise we get "Can't send + # command to RTP proxy" on massive number of calls with RTP + ulimit -n 16384 +fi if [ "$SSD_SUID" != "yes" ]; then OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP" diff --git a/debian/kamailio-proxy.init b/debian/kamailio-proxy.init index 7682f681b..8cb86904d 100644 --- a/debian/kamailio-proxy.init +++ b/debian/kamailio-proxy.init @@ -114,16 +114,20 @@ PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`)) [ -z "$GROUP" ] && GROUP=kamailio -if test "$DUMP_CORE" = "yes" ; then - # set proper ulimit - ulimit -c unlimited -fi +if /usr/sbin/ngcp-virt-identify --type container; then + echo "container environment detected. Skip ulimit commands" +else + if test "$DUMP_CORE" = "yes" ; then + # set proper ulimit + ulimit -c unlimited + fi -# raise memlock limit, otherwise mysql client fails to initialize -ulimit -l unlimited -# raise file descriptors limit, otherwise we get "Can't send -# command to RTP proxy" on massive number of calls with RTP -ulimit -n 16384 + # raise memlock limit, otherwise mysql client fails to initialize + ulimit -l unlimited + # raise file descriptors limit, otherwise we get "Can't send + # command to RTP proxy" on massive number of calls with RTP + ulimit -n 16384 +fi if [ "$SSD_SUID" != "yes" ]; then OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"