diff --git a/el/rtpengine-recording.init b/el/rtpengine-recording.init index 75597b800..1dc3299db 100644 --- a/el/rtpengine-recording.init +++ b/el/rtpengine-recording.init @@ -31,7 +31,7 @@ prog=rtpengine-recording runfile=/usr/sbin/${prog} pidfile=${PIDFILE-/var/run/rtpengine-recording.pid} lockfile=${LOCKFILE-/var/lock/subsys/rtpengine-recording} -cachefile=/var/lib/ngcp-rtpengine/$prog.cfg + RETVAL=0 OPTS="" diff --git a/el/rtpengine.init b/el/rtpengine.init index b5b8ca394..27f9459d5 100644 --- a/el/rtpengine.init +++ b/el/rtpengine.init @@ -48,19 +48,19 @@ build_opts() { fi else # configfile exists? - if [ ! -f $configfile ];then + if [ ! -f "$configfile" ];then echo "Error: $configfile not present" exit -1 fi # get table variable from config - table="$(grep -Ei '^table' $configfile|cut -d\ -f3)" - if [ -z $table ];then - table="$(grep -Ei '^table' $configfile|cut -d= -f3)" + table="$(grep -Ei '^table' "$configfile" | cut -d\ -f3)" + if [ -z "$table" ];then + table="$(grep -Ei '^table' "$configfile" | cut -d= -f3)" fi # error if directive is not presented in config - if [ -z $table ];then + if [ -z "$table" ];then echo "Error: directive table= is not present in $configfile" exit -1 fi @@ -79,9 +79,9 @@ build_opts() { fi # options - [[ "$FORK" == "no" ]] && OPTS+=" --foreground" - [[ "$LOG_STDERR" == "yes" ]] && OPTS+=" --log-stderr" - [[ "$FALLBACK" != "yes" ]] && OPTS+=" --no-fallback" + [[ "$FORK" == "no" ]] && OPTS+=" --foreground" + [[ "$LOG_STDERR" == "yes" ]] && OPTS+=" --log-stderr" + [[ "$FALLBACK" != "yes" ]] && OPTS+=" --no-fallback" [ -z "$CONFIG_FILE" ] || OPTS+=" --config-file=$CONFIG_FILE" [ -z "$CONFIG_SECTION" ] || OPTS+=" --config-section=$CONFIG_SECTION" [ -z "$ADDRESS" ] || OPTS+=" --interface=$ADDRESS"