Merge branch 'release-2.140.110'
[feisty_meow.git] / scripts / site_avenger / teardown.sh
index 3e194083baa03488ab4705dd7edd9b30619b82a0..91de942005a0ffaec25ae9e863ece47a97924d7d 100644 (file)
@@ -47,7 +47,7 @@ source "$WORKDIR/shared_site_mgr.sh"
 
 sep
 
-check_application_dir "$BASE_APPLICATION_PATH"
+check_apps_root "$BASE_APPLICATION_PATH"
 
 # find proper webroot where the site will be initialized.
 if [ -z "$app_dirname" ]; then
@@ -56,12 +56,20 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "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"
 
+# 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'"
+fi
+
 sep
 
 #echo "!! domain being removed is: $DOMAIN_NAME"