<commit_before>#!/usr/bin/env bash

# start with a fresh terminal
clear

echo "---------------------------"
echo "    Make new nginx host    "
echo "---------------------------"
echo
echo "Please choose some of the options below"
echo "to configure individual components."
echo "(case sensitive)"
echo

echo "Configure new nginx host? [Y/n]"
read NEW_HOSTNAME ; echo

if [ "$NEW_HOSTNAME" == "y" ] ; then
	echo "Please input your new nginx host name: "
	read HOSTNAME_URI ; echo
fi

echo "Review your choices above and type 'y' to continue..."
read CONT_INSTALL ; echo

if [ "$CONT_INSTALL" == "y" ] ; then
	echo "Continuing setup..."
	echo
else
	echo "Exiting setup."
	exit 0
fi

#--------------------#
# Start System Stuff #
#--------------------#

# build initinal host folders under /www
mkdir -p /www/$HOSTNAME_URI/{etc,ssl,logs,public,data,tmp}

# /www/*/etc/nginx.conf     Site nginx conf file
# /www/*/ssl/*              Site specific SSL files (private key, cert, etc)
# /www/*/logs/              Site specific webserver logs
# /www/*/public/*           Site web root folder
# /www/*/data/*             Site specific misc data folder
# /www/*/tmp/*              Site Specific TMP folder

# Install EveSpark Nginx Conf File
cat > /www/${HOSTNAME_URI}/etc/nginx.conf <<"ZOA"
server {
    listen                          80;
    server_name                     www.${HOSTNAME_URI} ${HOSTNAME_URI};
    rewrite                         ^ https://${HOSTNAME_URI}\$request_uri? permanent;
}

server {

    listen                          443;
    server_name                     ${HOSTNAME_URI};
<commit_msg>Fix variable inclusion in heredoc<commit_after>#!/usr/bin/env bash

# start with a fresh terminal
clear

echo "---------------------------"
echo "    Make new nginx host    "
echo "---------------------------"
echo
echo "Please choose some of the options below"
echo "to configure individual components."
echo "(case sensitive)"
echo

echo "Configure new nginx host? [Y/n]"
read NEW_HOSTNAME ; echo

if [ "$NEW_HOSTNAME" == "y" ] ; then
	echo "Please input your new nginx host name: "
	read HOSTNAME_URI ; echo
fi

echo "Review your choices above and type 'y' to continue..."
read CONT_INSTALL ; echo

if [ "$CONT_INSTALL" == "y" ] ; then
	echo "Continuing setup..."
	echo
else
	echo "Exiting setup."
	exit 0
fi

#--------------------#
# Start System Stuff #
#--------------------#

# build initinal host folders under /www
mkdir -p /www/$HOSTNAME_URI/{etc,ssl,logs,public,data,tmp}

# /www/*/etc/nginx.conf     Site nginx conf file
# /www/*/ssl/*              Site specific SSL files (private key, cert, etc)
# /www/*/logs/              Site specific webserver logs
# /www/*/public/*           Site web root folder
# /www/*/data/*             Site specific misc data folder
# /www/*/tmp/*              Site Specific TMP folder

# Install EveSpark Nginx Conf File
cat > /www/${HOSTNAME_URI}/etc/nginx.conf <<ZOA
server {
    listen                          80;
    server_name                     www.${HOSTNAME_URI} ${HOSTNAME_URI};
    rewrite                         ^ https://${HOSTNAME_URI}\$request_uri? permanent;
}

server {

    listen                          443;
    server_name                     ${HOSTNAME_URI};

{'fraction_non_alphanumeric': 0.16738727609635579, 'fraction_numerical': 0.0037059913526868438, 'mean_word_length': 1.8945487042001787, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 18, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3600431', 'n_tokens_mistral': 979, 'n_tokens_neox': 933, 'n_words': 314}