From 50e3ea14fc868449285cf0d3bd03b442be834de1 Mon Sep 17 00:00:00 2001 From: Marco Capetta Date: Mon, 5 Aug 2019 16:07:03 +0200 Subject: [PATCH] TT#23358 Move db_redis table descriptor in /etc/kamailio folder In postinst file add commands to move db_redis table descriptor in /etc/kamailio folder in oreder to be oevrwritten using ngcpcfg framework Change-Id: Id855946b59f65ca36c011949db3dfd01556530da (cherry picked from commit 1192c499ca6bbb0773cb66f9a0def72e0eb22667) --- debian/ngcp-kamailio.postinst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/ngcp-kamailio.postinst b/debian/ngcp-kamailio.postinst index aba849f15..6306476e4 100644 --- a/debian/ngcp-kamailio.postinst +++ b/debian/ngcp-kamailio.postinst @@ -11,6 +11,17 @@ case "$1" in --shell /bin/false --gecos "Kamailio" \ --home "$HOMEDIR" kamailio || true + # Move kamailio db_redis table descriptors onder /etc/kamailio/db_redis folder + # in order to easily modify it using ngcpcfg templates + if [ -d /usr/share/kamailio/db_redis ] && [ -d /etc/kamailio/ ]; then + + # Copy kamailio original content in the target folder + mv /usr/share/kamailio/db_redis /etc/kamailio/ + + # Create symlink + ln -sf /etc/kamailio/db_redis /usr/share/kamailio/db_redis + fi + # Remove obsolete rc.d links. update-rc.d kamailio-lb remove update-rc.d kamailio-proxy remove