Browse Source

add possibility to choose rtpengine process user

use RE_USER parameter of el/rtpengine.sysconfig
pull/178/head
Camille Oudot 10 years ago
parent
commit
5a8f5c3ab0
2 changed files with 14 additions and 2 deletions
  1. +12
    -2
      el/rtpengine.init
  2. +2
    -0
      el/rtpengine.sysconfig

+ 12
- 2
el/rtpengine.init View File

@ -180,7 +180,12 @@ start() {
then
echo "Loading module for in-kernel packet forwarding"
rmmod xt_RTPENGINE 2> /dev/null
modprobe xt_RTPENGINE
if [[ -n "$RE_USER" ]]
then
modprobe xt_RTPENGINE set_proc_id=1 proc_uid=$(id $RE_USER -u) proc_gid=$(id $RE_USER -g)
else
modprobe xt_RTPENGINE
fi
temp=`firewall-cmd --state 2>/dev/null`
if [[ $? == 0 ]]
then
@ -212,7 +217,12 @@ CUR_TABLE=$TABLE
EOF
fi
echo -n $"Starting $prog: "
daemon --pidfile=${pidfile} $rtpengine $OPTS
if [[ -n "$RE_USER" ]]
then
daemon --user $RE_USER --pidfile=${pidfile} $rtpengine $OPTS
else
daemon --pidfile=${pidfile} $rtpengine $OPTS
fi
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}


+ 2
- 0
el/rtpengine.sysconfig View File

@ -40,3 +40,5 @@ LISTEN_UDP=127.0.0.1:2222 # IP address and port combination for UDP
#REDIS=127.0.0.1:6379
#REDIS_DB=0
#B2B_URL=http://127.0.0.1:8080/xmlrpc
#RE_USER=rtpengine # Run rtpengine as this specific user

Loading…
Cancel
Save