3 # Author: Chris Koeritz
5 # This is the full orchestrator for bringing up a web site using our site
6 # management scripts. So far, the scripts rely on at least php. The support
7 # is much more powerful if the site is based on cakephp and site avenger.
9 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory.
10 export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
12 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
14 ############################
16 function print_instructions()
19 echo "$(basename $0 .sh) {app name}"
22 app name: The app name parameter is mandatory. The configuration file for
23 this script will be derived from the app name (e.g. if the app name is MyApp,
24 then the config file will be 'MyApp.config'). The config files are by
25 convention stored in the 'config' directory. The configuration file can be
26 overridden by setting the SITE_MANAGEMENT_CONFIG_FILE environment variable."
30 ############################
32 # main body of script.
34 # check for parameters.
35 app_dirname="$1"; shift
37 if (( $EUID != 0 )); then
38 echo "This script must be run as root or sudo."
42 if [ -z "$app_dirname" ]; then
46 source "$WORKDIR/shared_site_mgr.sh"
48 if [ "$app_dirname" == "-help" -o "$app_dirname" == "--help" ]; then
54 check_application_dir "$APPLICATION_DIR"
56 add_domain "$DOMAIN_NAME"
57 test_or_die "Setting up domain: $DOMAIN_NAME"
59 add_apache_site "$APPLICATION_NAME" "$DOMAIN_NAME"
60 test_or_die "Setting up apache site for: $APPLICATION_NAME"
62 powerup "$APPLICATION_NAME" "$REPO_NAME" "$THEME_NAME"
67 Finished standing up the full domain and site in: