X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsite_avenger%2Fteardown.sh;h=c332986a8931008d36c667487c9da0268b2f0e25;hb=5bbef23bd9f39d5f3914531d599c7c745e65adc6;hp=91de942005a0ffaec25ae9e863ece47a97924d7d;hpb=1f8e3880a0827865a0a81d7e63aa5eaa4b4d1441;p=feisty_meow.git diff --git a/scripts/site_avenger/teardown.sh b/scripts/site_avenger/teardown.sh index 91de9420..c332986a 100644 --- a/scripts/site_avenger/teardown.sh +++ b/scripts/site_avenger/teardown.sh @@ -5,8 +5,8 @@ # # Author: Chris Koeritz -export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. -export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )" +export THISDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. +export FEISTY_MEOW_APEX="$( \cd "$THISDIR/../.." && \pwd )" source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh" @@ -43,11 +43,11 @@ fi # through to ask for access. sudo bash -c 'echo sudo permissions acquired.' -source "$WORKDIR/shared_site_mgr.sh" +source "$THISDIR/shared_site_mgr.sh" sep -check_apps_root "$BASE_APPLICATION_PATH" +check_apps_root "$app_dirname" # find proper webroot where the site will be initialized. if [ -z "$app_dirname" ]; then @@ -56,18 +56,18 @@ if [ -z "$app_dirname" ]; then else test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname" fi -test_or_die "finding and testing app folder" +exit_on_error "finding and testing app folder" sep sudo bash "$FEISTY_MEOW_SCRIPTS/system/remove_apache_site.sh" "$DOMAIN_NAME" -test_or_die "dropping apache site for: $DOMAIN_NAME" +exit_on_error "dropping apache site for: $DOMAIN_NAME" # drop the shadow site too. shadow_domain="${APPLICATION_NAME}.cakelampvm.com" if [ "$shadow_domain" != "$DOMAIN_NAME" ]; then sudo bash "$FEISTY_MEOW_SCRIPTS/system/remove_apache_site.sh" "$shadow_domain" - test_or_die "dropping shadow apache site on '$shadow_domain'" + exit_on_error "dropping shadow apache site on '$shadow_domain'" fi sep @@ -75,7 +75,7 @@ sep #echo "!! domain being removed is: $DOMAIN_NAME" sudo bash "$FEISTY_MEOW_SCRIPTS/system/remove_domain.sh" "$DOMAIN_NAME" -test_or_die "dropping domain: $DOMAIN_NAME" +exit_on_error "dropping domain: $DOMAIN_NAME" sep