X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsystem%2Fremove_apache_site.sh;h=4465a759d100d155ce14f85335861c209fb44297;hb=f90f5da9cf6ccce35771b0a6c3d74f261411e309;hp=fb915d7e7bce887981756ccbfeba1bb4e8d1ea69;hpb=353d2f0887e378b38e81d61af52629369e1d8930;p=feisty_meow.git diff --git a/scripts/system/remove_apache_site.sh b/scripts/system/remove_apache_site.sh index fb915d7e..4465a759 100644 --- a/scripts/system/remove_apache_site.sh +++ b/scripts/system/remove_apache_site.sh @@ -3,8 +3,8 @@ # uninstalls the apache website for a specified domain. # auto-find the scripts, since we might want to run this as sudo. -export WORKDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )" # obtain the script's working directory. -export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )" +export THISDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )" # obtain the script's working directory. +export FEISTY_MEOW_APEX="$( \cd "$THISDIR/../.." && \pwd )" source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh" source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" @@ -12,7 +12,8 @@ source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" # some convenient defaults for our current usage. if [ -z "$BASE_APPLICATION_PATH" ]; then - BASE_APPLICATION_PATH="$HOME/apps" + BASE_APPLICATION_PATH="$FEISTY_MEOW_REPOS_SCAN" +#hmmm: take just first item! fi if [ -z "$STORAGE_SUFFIX" ]; then STORAGE_SUFFIX="/public" @@ -25,24 +26,20 @@ if [[ $EUID != 0 ]]; then exit 1 fi -appname="$1"; shift site="$1"; shift -site_path="$1"; shift -if [ -z "$appname" -o -z "$site" ]; then +if [ -z "$site" ]; then #hmmm: move to a print_instructions function. echo " -$(basename $0): {app name} +$(basename $0): {dns name} -This script needs to know (1) the application name for the site and -(2) the DNS name for the apache virtual host. The appname should be an -appropriate name for a file-system compatible folder name. +This script needs to know (1) the DNS name for the apache virtual host. The script will uninstall that site's configuration files for apache2. " exit 1 fi disable_site "$site" -remove_apache_config "$appname" "$site" +remove_apache_config "$site" restart_apache