X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;ds=inline;f=scripts%2Fsite_avenger%2Fstandup.sh;h=e3cf02c6d12569c8e5f1e48b0c3b4d2dc156cde3;hb=b99f5357395128241be47c883b6792a764242915;hp=762bd1ef6e8ba20e26e171fa99f7c6757fecbb66;hpb=22a5805eda90a51cef8990b2dc22335e50e070f4;p=feisty_meow.git diff --git a/scripts/site_avenger/standup.sh b/scripts/site_avenger/standup.sh index 762bd1ef..e3cf02c6 100644 --- a/scripts/site_avenger/standup.sh +++ b/scripts/site_avenger/standup.sh @@ -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 @@ -53,77 +61,9 @@ test_or_die "Setting up apache site for: $APPLICATION_NAME" powerup "$APPLICATION_NAME" "$REPO_NAME" "$THEME_NAME" - - - - sep echo " Finished standing up the full domain and site in: ${app_dirname}" -#leave before old crud below -exit 0 - - - - - - - - - - - - - - - - - - - - -#below is probably not needed. -# find proper webroot where the site will be initialized. -if [ -z "$app_dirname" ]; then - # no dir was passed, so guess it. - find_app_folder "$APPLICATION_DIR" -else - test_app_folder "$APPLICATION_DIR" "$app_dirname" -fi - -# where we expect to find our checkout folder underneath. -full_app_dir="$APPLICATION_DIR/$app_dirname" - -# use our default values for the repository and theme if they're not provided. -if [ -z "$repo_name" ]; then - repo_name="$app_dirname" -fi -if [ -z "$theme_name" ]; then - theme_name="$(capitalize_first_char ${app_dirname})" -fi - -echo "Repository: $repo_name" -echo "Theme name: $theme_name" -sep - -# this should set the site_store_path variable if everything goes well. -update_repo "$full_app_dir" "$CHECKOUT_DIR_NAME" "$DEFAULT_REPOSITORY_ROOT" "$repo_name" -test_or_die "Updating the repository storage directory" - -# update the site to load dependencies. -sep -composer_repuff "$site_store_path" -test_or_die "Installing site dependencies with composer" - -# set up the symbolic links needed to achieve siteliness. -sep - -create_site_links "$site_store_path" "$theme_name" - -sep - -echo "Finished powering up the site in '${app_dirname}'." -