-# some convenient defaults for our current usage.
-
-BASE_PATH="$HOME/apps"
-STORAGE_SUFFIX="/public"
-
-# this function writes out the new configuration file for the site.
-function write_apache_config()
-{
- local appname="$1"; shift
- local sitename="$1"; shift
- local site_config="/etc/apache2/sites-available/${sitename}.conf"
-
- # check if config file already exists and bail if so.
- if [ -f "$site_config" ]; then
- echo "The apache configuration file already exists at:"
- echo " $site_config"
- echo "Please remove this file before proceeding, if it is junk. For example:"
- echo " sudo rm $site_config"
- exit 1
- fi
-
- echo "Creating a new apache2 site for $sitename with config file:"
- echo " $site_config"
-
- local full_path="${BASE_PATH}/${appname}${STORAGE_SUFFIX}"
-echo really full path is $full_path
-
-#no, bad! the public folder will be a link.
-# will apache be happy if the site folder doesn't exist yet?
-# # make the storage directory if it's not already present.
-# if [ ! -d "$full_path" ]; then
-# mkdir -p "$full_path"
-# if [ $? -ne 0 ]; then
-# echo "Failed to create the storage directory for $appname in"
-# echo "the folder: $full_path"
-# exit 1
-# fi
-# fi