3cx_expose_voip_ms_sms_webhook/undo_expose.sh

21 lines
498 B
Bash
Raw Normal View History

2025-07-15 04:49:53 +00:00
#!/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