Add undo_expose.sh
This commit is contained in:
parent
42d20d161a
commit
cbf3c5f95d
1 changed files with 20 additions and 0 deletions
20
undo_expose.sh
Normal file
20
undo_expose.sh
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue