Created
May 21, 2018 22:52
-
-
Save Spuffynism/18c6932c89dc26f44cd6d26921bcc02b to your computer and use it in GitHub Desktop.
Deletes a virtual host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [[ $# -eq 0 ]] ; then | |
| echo 'You must specify a valid virtual host name' | |
| exit 0 | |
| fi | |
| vhost=$1 | |
| export vhost | |
| sudo rm -rf /var/www/"$vhost" | |
| sudo a2dissite "$vhost".conf | |
| sudo rm -rf /etc/apache2/sites-available/"$vhost".conf | |
| sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment