Rename site_definition to site.conf

This commit is contained in:
Derek Smith 2023-03-13 13:53:18 -04:00
parent c042ff404f
commit 5e8cc9cee0
Signed by: farscapian
GPG Key ID: B443E530A14E1C90

View File

@ -181,12 +181,12 @@ function stub_site_definition {
ln -s "$SITE_PATH" "$PROJECT_PATH/sites/$DOMAIN_NAME" ln -s "$SITE_PATH" "$PROJECT_PATH/sites/$DOMAIN_NAME"
fi fi
if [ ! -f "$SITE_PATH/site_definition" ]; then if [ ! -f "$SITE_PATH/site.conf" ]; then
# check to see if the enf file exists. exist if not. # check to see if the enf file exists. exist if not.
SITE_DEFINITION_PATH="$SITE_PATH/site_definition" SITE_DEFINITION_PATH="$SITE_PATH/site.conf"
if [ ! -f "$SITE_DEFINITION_PATH" ]; then if [ ! -f "$SITE_DEFINITION_PATH" ]; then
# stub out a site_definition with new passwords. # stub out a site.conf with new passwords.
cat >"$SITE_DEFINITION_PATH" <<EOL cat >"$SITE_DEFINITION_PATH" <<EOL
#!/bin/bash #!/bin/bash
@ -209,7 +209,7 @@ export GITEA_MYSQL_ROOT_PASSWORD="$(new_pass)"
EOL EOL
chmod 0744 "$SITE_DEFINITION_PATH" chmod 0744 "$SITE_DEFINITION_PATH"
echo "INFO: we stubbed a new site_definition for you at '$SITE_DEFINITION_PATH'. Go update it!" echo "INFO: we stubbed a new site.conf for you at '$SITE_DEFINITION_PATH'. Go update it!"
exit 1 exit 1
fi fi
@ -318,12 +318,12 @@ EOL
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ./domain_env.sh source ./domain_env.sh
# VALIDATE THE INPUT from the ENVFILE # VALIDATE THE INPUT from the ENVFILE
if [ -z "$DOMAIN_NAME" ]; then if [ -z "$DOMAIN_NAME" ]; then
echo "ERROR: DOMAIN_NAME not specified in your site_definition." echo "ERROR: DOMAIN_NAME not specified in your site.conf."
exit 1 exit 1
fi fi