Skip to content

Instantly share code, notes, and snippets.

@notcod
Last active February 19, 2023 16:22
Show Gist options
  • Save notcod/31b84568d8d6059dfd99179168591421 to your computer and use it in GitHub Desktop.
Save notcod/31b84568d8d6059dfd99179168591421 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ -f "/etc/apache2/sites-available/$1.conf" ]
then
a2dissite $1.conf > /dev/null 2>&1
rm /etc/apache2/sites-available/$1.conf
rm -rf /var/www/$1
rm /etc/apache2/ssl/$1.pem
rm /etc/apache2/ssl/$1.key
else
echo "File is not found"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment