21 lines
475 B
Bash
Executable File
21 lines
475 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# vhost-stack
|
|
# https://git.stack-source.com/msb/vhost-stack
|
|
# MIT License Copyright (c) 2021 Matthew Saunders Brown
|
|
|
|
# load include file
|
|
source $(dirname $0)/vhost.sh
|
|
|
|
# check for and set virtualhost
|
|
if [ -n "$1" ]; then
|
|
virtualhost=$1
|
|
else
|
|
echo "virtualhost not set"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -h /etc/apache2/sites-enabled/$virtualhost.conf ]]; then
|
|
a2dissite --quiet $virtualhost && systemctl --quiet is-active apache2 && systemctl --quiet reload apache2
|
|
fi
|