Check that a domain name is supplied

This commit is contained in:
Bob Mottram 2018-03-31 13:50:28 +01:00
parent 55446a0bf8
commit c8e90a454a
2 changed files with 10 additions and 0 deletions

View File

@ -217,6 +217,11 @@ function install_bludit {
apt-get -yq install php-gettext php-curl php-gd php-mysql git curl
apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl
if [ ! "$BLUDIT_DOMAIN_NAME" ]; then
echo $'No domain name was given'
exit 3568356
fi
if [ -d "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" ]; then
rm -rf "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
fi

View File

@ -594,6 +594,11 @@ if [[ "$app_php" == 'yes' ]]; then
echo ''
fi
echo " if [ ! \"\$${app_name_upper}_DOMAIN_NAME\" ]; then"
echo " echo \$'No domain name was given'"
echo ' exit 3568356'
echo ' fi'
echo ''
echo " if [ -d \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" ]; then"
echo " rm -rf \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
echo ' fi'