From cbf3c5f95d7ae8bcfd944a316e8b50388c2b584f Mon Sep 17 00:00:00 2001 From: edschuy95 Date: Tue, 15 Jul 2025 04:49:53 +0000 Subject: [PATCH] Add undo_expose.sh --- undo_expose.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 undo_expose.sh diff --git a/undo_expose.sh b/undo_expose.sh new file mode 100644 index 0000000..b9a1f11 --- /dev/null +++ b/undo_expose.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# === CONFIG === +# DB config +DB_NAME="database_single" +DB_USER="postgres" + +# Filenames +ORIGINAL="voipms.pv.xml" +CUSTOM="voipms-smscustom.pv.xml" + +# === SCRIPT === + +echo "🔗 Reverting trunk model in database..." +# This resets any trunk using the custom template back to the original +sudo -u postgres psql -d "$DB_NAME" -c "UPDATE gateway SET model = '$ORIGINAL' WHERE model = '$CUSTOM';" + +echo "Database model reverted: $CUSTOM → $ORIGINAL" +3CXStopServices +3CXStartServices