add some error checking with exit codes
This commit is contained in:
parent
8cb1be03cb
commit
b3cd92e8ff
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user