Related to commit a3062b5f, let's also update the RPM spec file, its
configs/scripts and the README, to use /usr/bin instead of /usr/sbin.
While at it, noticed that el/ngcp-rtpengine-iptables-setup seemed to use
a wrong path (/sbin/rtpengine-get-table instead of
/usr/sbin/rtpengine-get-table), adjusted accordingly.
While at it, also fixed mixed-use-of-spaces-and-tabs issues (as reported
by rpmlint) in rtpengine.spec.
FTR, we have the following layout in the resulting RPMs now:
* /usr/bin/rtpengine
* /usr/bin/rtpengine-ctl
* /usr/bin/rtpengine-recording
* /usr/sbin/ngcp-rtpengine-iptables-setup
* /usr/sbin/rtpengine-get-table
Change-Id: I7e9e3527f4dc07adba425172cebb5672f2541690
Fixes:
| In debian/ngcp-rtpengine-iptables-setup line 15:
| TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file=$CONFIG_FILE)
| ^----------^ SC2086: Double quote to prevent globbing and word splitting.
|
| In el/rtpengine.init line 36:
| configfile=${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}
| ^--------^ SC2034: configfile appears unused. Verify use (or export if used externally).
|
| In el/rtpengine.init line 38:
| TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file=$CONFIG_FILE)
| ^----------^ SC2086: Double quote to prevent globbing and word splitting.
Those went unnoticed in commit 111b0a769c, but are failing
in github actions with shellcheck v0.7.2.
While at it, ensure that /etc/rtpengine/rtpengine.conf
is used as fallback, if CONFIG_FILE isn't defined.
Change-Id: I1c1948245a907bd6d299b242a9faff960d0608bc
These can be set from the config file, which makes the support in the
sysvinit script redundant. Remove all these and leave only the minimally
relevant ones involved in the startup of the daemon.
Change-Id: I3faac4594d7f1a21e65761036c2ab153acb96152
The default value for the kernel table in rtpengine is -1, so the helper
should default to use the same to match in case the parameter is not set
in the config file.
Remove an explicit --table passed to the daemon in the el init script,
and remove fallback initialization handling already done by the new
helper.
Change-Id: Ie4ec50a34e467f829279ad626a5b0e3b15acfd16
Fixes: commit 111b0a769c
This centralizes the table setting into the respective config files
instead of keeping copies all over the place, that can easily get out
of sync.
Change-Id: I12f3fa172f34861365c31c8d8718b3fae8a9de5b
shellcheck v0.7.1 complains about a bunch of issues:
SC2154: status is referenced but not assigned.
SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
SC2235: Use { ..; } instead of (..) to avoid subshell overhead.
SC2236: Use -n instead of ! -z.
The "$status" variable disappeared in d4763aba14.
The init scripts of ngcp-rtpengine-daemon and
ngcp-rtpengine-recording-daemon had a logic bug, where a failing stop
action didn't properly return, but continued execution of the following
firewalling code (ngcp-rtpengine-iptables-setup). Thanks to Guillem
Gover for spotting this one. While at it, no longer execute under
'set -e'.
Change-Id: Ia50e76f615564a288627e6e42ec8f7eb082de74c
`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
* 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
Im Moment wurden die sessions ja nach 30 sekunden hardcoded abgeräumt.
Dieser patch macht das konfigurabel.
ersetzt den letzten patch "added_delete_delay_for_memory_cleanup.patch".
Author: Frederic-Philippe Metz <Frederic.Metz@1und1.de>
Ein Commandline interface, wo man von der console and der rtpengine
bestimme Dinge abfragen kann.
Author: Frederic-Philippe Metz <Frederic.Metz@1und1.de>