Skip to content
Snippets Groups Projects
Commit c8e90a45 authored by Bob Mottram's avatar Bob Mottram
Browse files

Check that a domain name is supplied

parent 55446a0b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment