diff --git a/bin/vhost-disable.sh b/bin/vhost-disable.sh index 2041419..e44a1df 100755 --- a/bin/vhost-disable.sh +++ b/bin/vhost-disable.sh @@ -25,9 +25,12 @@ vhost:getoptions "$@" # check for domain (virtualhost) if [[ -z $domain ]]; then echo "domain is required" - exit + exit 1 fi if [[ -h /etc/apache2/sites-enabled/$domain.conf ]]; then a2dissite --quiet $domain +else + echo "$domain is not enabled, nothing to do" + exit 1 fi