PhyrePanel-mirror/bin/nginx-website-delete.sh
2024-04-22 14:14:05 +03:00

16 lines
331 B
Bash

#!/bin/bash
# Path to NGINX sites-available directory
SITES_AVAILABLE_DIR="/etc/nginx/sites-available"
SITES_ENABLED_DIR="/etc/nginx/sites-enabled"
# Delete the site
rm -rf $SITES_AVAILABLE_DIR/$1.conf
rm -rf $SITES_ENABLED_DIR/$1.conf
rm -rf /var/www/$1
# Reload NGINX
service nginx reload
echo "Deleted site $1"
echo "done!"