Spaces:
Sleeping
Sleeping
Download activate_n8n.sh from GTO-Custom-AI/engine: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/spaces/GTO-Custom-AI/engine/resolve/main/activate_n8n.sh
- Command line
-
hf download hf://spaces/GTO-Custom-AI/engine/activate_n8n.sh
-
curl -L -o activate_n8n.sh https://huggingface.co/spaces/GTO-Custom-AI/engine/resolve/main/activate_n8n.sh
1.12 kB
| # n8n-activate.sh | |
| # This script manually flips the 'active' bit in the n8n SQLite database. | |
| DB_PATH="/data/.n8n/database.sqlite" | |
| if [ ! -f "$DB_PATH" ]; then | |
| echo "Error: Database not found at $DB_PATH" | |
| exit 1 | |
| fi | |
| echo "Surgically activating all production workflows..." | |
| # Set all workflows with 'PRODUCTION' in the name to active | |
| sqlite3 "$DB_PATH" "UPDATE workflow_entity SET active = 1 WHERE name LIKE '%PRODUCTION%';" | |
| # Also ensure the webhook_entity table is populated for the handler | |
| # We use a subquery to get the ID of the handler | |
| WORKFLOW_ID=$(sqlite3 "$DB_PATH" "SELECT id FROM workflow_entity WHERE name = 'Stripe Webhook Handler - PRODUCTION' LIMIT 1;") | |
| if [ -n "$WORKFLOW_ID" ]; then | |
| echo "Registering webhook route for $WORKFLOW_ID..." | |
| sqlite3 "$DB_PATH" "INSERT OR REPLACE INTO webhook_entity (workflowId, webhookPath, method, node, webhookId, pathLength) VALUES ('$WORKFLOW_ID', 'stripe-webhook', 'POST', 'webhook-node', 'stripe-webhook', 15);" | |
| else | |
| echo "Error: Stripe Webhook Handler not found in database." | |
| fi | |
| echo "Activation complete. Restarting n8n for routing refresh..." | |