mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-09-30 17:58:11 +00:00
- 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
20 lines
659 B
Bash
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
|