Minor updates.

This commit is contained in:
Derek Smith 2023-03-11 11:12:19 -05:00
parent b2abf3fdf4
commit efeb0261bc
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
3 changed files with 9 additions and 3 deletions

View File

@ -1 +1 @@
#project/
project

View File

@ -2,8 +2,8 @@
set -e
cd "$(dirname "$0")"
# this script takes down all resources in the remote. This script is DESTRUCTIVE of data, so make sure it's backed up first.
# this script destroys all resources in the current project.
if lxc remote get-default | grep -q "local"; then
echo "ERROR: you are on the local lxc remote. Nothing to destroy"

View File

@ -17,9 +17,15 @@ fi
source "$PROJECT_DEFINITION_PATH"
export PRIMARY_SITE_DEFINITION_PATH="$SITES_PATH/$PRIMARY_DOMAIN/site_definition"
source "$PRIMARY_SITE_DEFINITION_PATH"
if [ ! -f "$PRIMARY_SITE_DEFINITION_PATH" ]; then
echo "ERROR: the site definition does not exist."
exit 1
fi
if [ -z "$PRIMARY_DOMAIN" ]; then
echo "ERROR: The PRIMARY_DOMAIN is not specified. Check your remote definition at '$PRIMARY_SITE_DEFINITION_PATH'."
exit 1
fi
source "$PRIMARY_SITE_DEFINITION_PATH"