telephony/net/kamailio/files/kamailio.hotplug
Sebastian Kemper a0ac804663 kamailio: minor bump + drop 5.x suffix
Bumps kamailio to version 5.4.2 and removes the suffix, as there is only
one kamailio version at a time anyway.

Also:

 - Replaces a few $(PKG_NAME) uses with simply "kamailio"
 - Drops the use of variable PKG_VARIANT (was not set anyway)
 - Drops 160-openssl-deprecated.patch (upstream first accepted the
   patch, then dropped it again after crashes were reported, see [1])

[1] https://github.com/kamailio/kamailio/issues/2466

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2020-12-12 23:55:36 +01:00

24 lines
431 B
Bash

#!/bin/sh
[ "$ACTION" = ifup ] || exit 0
NAME=kamailio
COMMAND=/etc/init.d/$NAME
LOGGER="/usr/bin/logger -t hotplug"
$COMMAND enabled || exit 0
. /lib/functions.sh
config_load $NAME
config_get_bool enabled general enabled 0
[ $enabled -eq 0 ] && exit 0
config_get hotplug_iface hotplug interface
[ "$INTERFACE" = "$hotplug_iface" ] && {
$LOGGER "Restarting $NAME due to \"$ACTION\" of \"$INTERFACE\""
$COMMAND restart
}