← back to SmokeShop
shutdown-monday.sh
19 lines
#!/bin/bash
# Shutdown SmokeShop at Monday 8am PT (scheduled via cron at 15:00 UTC)
# Send Slack notification to Steve, then stop PM2 process
SLACK_WEBHOOK="https://hooks.slack.com/services/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"
# Notify Steve via Slack
curl -s -X POST "$SLACK_WEBHOOK" \
-H 'Content-type: application/json' \
-d '{"text":"*SmokeShop (8401) has been shut down* as scheduled.\nMonday 8:00 AM PT — the demo site at http://45.61.58.125:8401 is now offline.\nTo restart: `pm2 start smokeshop`"}'
# Stop the PM2 process
pm2 stop smokeshop
# Remove this cron job (self-cleanup)
crontab -l 2>/dev/null | grep -v "shutdown-monday" | crontab -
echo "[SmokeShop] Shutdown complete at $(date)"