working towards goodness
[feisty_meow.git] / scripts / site_avenger / standup.sh
index 2ae953bb53409badf3ae85cafce07eee893d513f..bc109031138fbc3544cb6eb7c9f4e5d5f034e8fd 100644 (file)
@@ -7,6 +7,9 @@
 # is much more powerful if the site is based on cakephp and site avenger.
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
+export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
+
+source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
 
 ############################
 
@@ -31,6 +34,11 @@ overridden by setting the SITE_MANAGEMENT_CONFIG_FILE environment variable."
 # check for parameters.
 app_dirname="$1"; shift
 
+if (( $EUID != 0 )); then
+  echo "This script must be run as root or sudo."
+  exit 1
+fi
+
 if [ -z "$app_dirname" ]; then
   print_instructions
 fi
@@ -48,9 +56,13 @@ check_application_dir "$APPLICATION_DIR"
 add_domain "$DOMAIN_NAME"
 test_or_die "Setting up domain: $DOMAIN_NAME"
 
+sep
+
 add_apache_site "$APPLICATION_NAME" "$DOMAIN_NAME"
 test_or_die "Setting up apache site for: $APPLICATION_NAME"
 
+sep
+
 powerup "$APPLICATION_NAME" "$REPO_NAME" "$THEME_NAME"
 
 sep