`exit -1` is out of range in shell scripts and returning
with 255, while init scripts are supposed to be exit with `1`
and similar on errors.
We're following
http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html
and returning with exit code 6 for configuration issues.
Change-Id: I8eda8e059c4ea10b9ddbddd1306627894073b034
Otherwise we might end up with empty "$TABLE", while we're
trying to execute:
echo "del $TABLE" > /proc/rtpengine/control
This will fail with `echo: write error: Invalid argument` error then.
Instead set TABLE by default to '0'. Users can
customize this via /etc/sysconfig/rtpengine,
and the file is sourced after we set the default.
Closes#696
Change-Id: I2f9bb810757507bcc01509ce02676af0d711f515
If you don't need to use transcoding and recording, so you don't need
to install ffmpeg libraries. Just change with_transcoding to 0.
Also some changes according directory name inside tar.gz archive
* warning: cachefile appears unused. Verify it or export it. [SC2034]
* warning: Double quote to prevent globbing and word splitting. [SC2086]
* removed unnecessary space
Change-Id: I71276ca08d1a5599bf1034403d2973ef78d8079e
- Add missing quotes.
- Switch some problematic usages to use bash arrays.
- Override shellcheck errors (these might need fixing in the future).
Change-Id: Id451ff9f4c5d5ef9b3826544908d64e9c08c5797
fix typo and error:
./rtpengine.init: line 111: syntax error in conditional expression
./rtpengine.init: line 111: syntax error near `-a'
./rtpengine.init: line 111: ` if [[ -n "$REDIS" -a -n "$REDIS_DB" ]]'
which is before the conntrack stuff in the INPUT tables. We then create
our temporary rtpengine chain from that.
Also brought in some of the IPv6 stuff from the standard Centos init script
Just a cosmetic actually. Earlier we created user,group anyway and
suppress error message if user or group already exists.
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>