MT#6485 add container check at init script

mr3.4.1
Victor Seva 11 years ago
parent fdf507d58b
commit d3001c9e7a

3
debian/control vendored

@ -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},

@ -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"

@ -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"

Loading…
Cancel
Save