Files
PyRIGS/scripts/cron-uninstall.sh
Hang c1ac0065ee ci: update compose.yml for prod deployment
- Add Nginx as a reverse proxy
- Add cert-selfsign.sh for generating self-signed certificates
- Add certbot-issue.sh for Let's Encrypt certificate issuance and renewal
- Add cron-install.sh and cron-uninstall.sh for system cron management
- Add .env.example as an environment variable template
2026-08-23 23:10:30 +01:00

20 lines
659 B
Bash

#!/usr/bin/env bash
# Uninstall the scheduled tasks installed by cron-install.sh (run as root on the deployment server)
# Usage: sudo ./scripts/cron-uninstall.sh
set -euo pipefail
CERTBOT_CRON="/etc/cron.d/pyrigs-certbot"
DJANGO_CRON="/etc/cron.d/pyrigs-django"
HOOK_PATH="/etc/letsencrypt/renewal-hooks/deploy/pyrigs-deploy.sh"
rm -f "$CERTBOT_CRON" "$DJANGO_CRON"
echo "Removed scheduled tasks: $CERTBOT_CRON $DJANGO_CRON"
if [ -f "$HOOK_PATH" ]; then
read -rp "Also remove the deploy-hook ($HOOK_PATH)? [y/N] " ans
case "$ans" in
y|Y) rm -f "$HOOK_PATH"; echo "Deploy-hook removed" ;;
*) echo "Deploy-hook kept" ;;
esac
fi