Merge branch 'release-2.140.110' 2.140.110
authorChris Koeritz <fred@gruntose.com>
Fri, 23 Mar 2018 14:48:19 +0000 (10:48 -0400)
committerChris Koeritz <fred@gruntose.com>
Fri, 23 Mar 2018 14:48:19 +0000 (10:48 -0400)
    powerup does not try to do any chmods now.
    i have seen a failure of powerup due to chmods composer tries to do during the install step; this can be fixed by running standup again.  subsequent powerups should work fine.
    added a switchto function to jump to an application directory.  e.g. switchto ecocor6 will jump into the apps/ecocor6/avenger5 directory.
    stopped adding the swap disk automatically in revamp.  having a ram disk on an SSD based machine can use up the lifespan too quickly, so it was though better to not add it unless explicitly asked.
    if the variable ADD_SWAP is set (to anything), then the swap drive will be added.  otherwise it will not be.  usage could be like:
    export ADD_SWAP=true ; revamp_cakelampvm
    added "map archive = no" to global section in samba config to stop archive bit mapping feature from hosing executable bits.
    locked the revamp command to only operate on a host that contains "cakelampvm" to avoid scorching other hosts.

15 files changed:
infobase/fortunes.dat
production/feisty_meow_config.ini
scripts/core/common.alias
scripts/core/functions.sh
scripts/customize/fred/scripts/games/zap_fallout_task.sh [new file with mode: 0644]
scripts/site_avenger/avcoreup.sh
scripts/site_avenger/config/ecocor6.app [new file with mode: 0644]
scripts/site_avenger/powerup.sh
scripts/site_avenger/revamp_cakelampvm.sh
scripts/site_avenger/shared_site_mgr.sh
scripts/site_avenger/sitepush.sh
scripts/site_avenger/siteup.sh
scripts/site_avenger/standup.sh
scripts/site_avenger/teardown.sh
scripts/system/naive_system_updater.sh

index c1ee8956b521a16a4511fbee1760bdb80a3efb01..e0afccec3fc9244e3793382f8862543b6f35ae95 100644 (file)
@@ -43199,4 +43199,67 @@ Into a single space.
 Remember this and practice Dharma from your heart.
   -- Longchenpa, from "Finding Rest in the Nature of the Mind", published
      by Shambhala Publications
+~
+    The most important thing is to have faith and trust in the Buddha’s
+words.  The Buddha’s teachings were not taught to deceive us but to explain
+the way things actually are.  Many people try to analyze the Buddha’s
+teachings, but how is it possible to scrutinize a buddha’s qualities?  We
+don’t even know what will happen tomorrow, or when we will die, or anything
+about our future lives, so how could we possibly examine the teachings of the
+Omniscient One?  Since we are totally obscured by our strong disturbing
+emotions, in order to progress on the path toward enlightenment, we have no
+choice but to have faith in the Buddha’s teachings and apply them in our own
+lives.
+    The ability to practice Dharma depends on certain conditions.  For
+example, this is a rare time during which the teachings of the Great
+Perfection are said to flourish.  We’re very fortunate that through
+Padmasambhava’s blessings, such teachings have appeared and we’re able to
+receive them.  We must have accumulated incredible merit and made fervent
+prayers very sincerely over numerous lifetimes to be able to encounter such
+amazing teachings now.  Still, most people are just too involved in worldly
+activities to have time to practice the Dharma, and very few people in this
+world totally dedicate themselves to the teachings.  Most people work for the
+sake of success in this life, to gain wealth, fame, power, and so on, but none
+of these worldly aims can liberate us from the suffering of samsara; in fact,
+they only create further conditions for ensuring that we remain in samsara for
+countless lifetimes to come.
+  -- Penor Rinpoche, from "An Ocean of Blessings: Heart Teachings of Drubwang
+     Penor Rinpoche", translated by Ani Jinba Palmo, published by Shambhala
+     Publications
+~
+    "When the sun comes out and illumines the world, its image is reflected in
+all clean vessels of water, being in all places without coming or going.  If
+one vessel breaks, then the reflection of the sun does not appear in it.  Do
+you think it is the fault of the sun that its reflection does not appear
+there?"
+    "No--it is just because the vessel is broken; it’s no fault of the sun."
+    "The knowledge of realization of Thusness, buddha-knowledge, is also like
+this, appearing throughout the cosmos, without before or after: Buddha appears
+in the clean mind-vessels of all sentient beings.  If the mind-vessel is
+always clean, the embodiment of Buddha is always seen; if the mind is
+polluted, the vessel breaks and the Buddha cannot be seen."
+  -- from "The Flower Ornament Scripture: A Translation of The Avatamsaka
+     Sutra", translated by Thomas Cleary, published by Shambhala Publications
+~
+Why is endeavor necessary?  If we consider material progress, we see that
+research started by one person can always be continued by another.  But this
+is not possible with spiritual progress.  The realization we talk about in the
+Buddhadharma is something that has to be accomplished by the individual.  No
+one else can do it for us.  Of course, it would be wonderful if in the future
+we could attain realization through some sort of new injection or by means of
+a new generation of computers, without having to go through any difficulties.
+If we could be absolutely certain that such a time would come, we could simply
+lie back and wait to get enlightened.  But I doubt that this will ever happen.
+It is better to make an effort.  We have to develop endeavor.
+
+    1.
+    Thus with patience I will strive with diligence.
+    For in such diligence enlightenment is found.
+    If no wind blows, then nothing stirs,
+    And neither is there merit without diligence.   
+
+  -- H.H. the Fourteenth Dalai Lama, from "The Bodhisattva Guide: A Commentary
+     on The Way of the Bodhisattva", The Bodhisattva Guide was originally
+     published as For the Benefit of All Beings, also published by Shambhala
+     Publications
 
index 8cdddd871b2f7f8f7f2bf6fd289f3a436dde0efb..8835abdaa11eb30310c653573bec58a33fbca04a 100644 (file)
@@ -3,7 +3,7 @@
 # specifies the version of the code that is being constructed here.
 major=2
 minor=140
-revision=109
+revision=110
 build=420
 
 # specifies the remainder of the version record info.
index ea90610816a72a18576c0566b794bb1d20748916..09eb72ec44246c4e87652d28ad8117c6e18d94b1 100644 (file)
@@ -110,7 +110,7 @@ define_yeti_alias add_apache_site="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_ap
 define_yeti_alias remove_apache_site="sudo bash \$FEISTY_MEOW_SCRIPTS/system/remove_apache_site.sh"
 define_yeti_alias add_swap_mount="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_swap_mount.sh"
 
-#hmmm: some magma intrusions from the fred customizations...
+# some site avenger sudoized aliases.
 define_yeti_alias revamp_cakelampvm="sudo bash \"$FEISTY_MEOW_SCRIPTS/site_avenger/revamp_cakelampvm.sh\""
 
 ##############
index 4ace5d80f3cbfad44ae81041fccfeafca20bda86..644ce8a0c575cab98eda33e6230e38fd16b8127e 100644 (file)
@@ -929,6 +929,16 @@ return 0
 
   ##############
 
+  # site avenger aliases
+  function switchto()
+  {
+    WORKDIR="$FEISTY_MEOW_SCRIPTS/site_avenger"
+    source "$FEISTY_MEOW_SCRIPTS/site_avenger/shared_site_mgr.sh"
+    switch_to "$1"
+  }
+
+  ##############
+
   # NOTE: no more function definitions are allowed after this point.
 
   function function_sentinel()
diff --git a/scripts/customize/fred/scripts/games/zap_fallout_task.sh b/scripts/customize/fred/scripts/games/zap_fallout_task.sh
new file mode 100644 (file)
index 0000000..21e1ddf
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# windows compatible process killer for any stray processes started as
+#"fallout" something.
+
+source $FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh
+
+procid="$( psa fallout | tail -n 1 | awk '{ print $1; }' )"
+
+if [ ! -z "$procid" ]; then
+  taskkill.exe /f /pid ${procid}
+fi
index 2ae511cbb8eb50148b9efd2841ee0bddf088463e..33c3daafe142c01b70412268dd0ef332e8392e4a 100644 (file)
@@ -18,7 +18,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
@@ -27,6 +27,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 # where we expect to find our checkout folder underneath.
 full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
diff --git a/scripts/site_avenger/config/ecocor6.app b/scripts/site_avenger/config/ecocor6.app
new file mode 100644 (file)
index 0000000..d1d3edc
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# override for ecocor6 to set the theme.
+
+export THEME_NAME="Ecocor"
+echo "*** overrode THEME_NAME as: $THEME_NAME"
+
index 3709bc301958a2ed52274f7d7fe07a77ec2c04d9..eccb0b6aefd33f6ace6af024be3390c88fcc1843 100644 (file)
@@ -3,8 +3,8 @@
 # Author: Kevin Wentworth
 # Author: Chris Koeritz
 
-# This script "powers up" a cakephp site by running the database migrations,
-# cleaning out the ORM cache, and fixing file permissions.
+# This script "powers up" a cakephp site by checking out the code from the
+# git repository and installing the composer dependencies.
 # This script is currently highly specific to site avenger.
 
 # General Info:
@@ -13,7 +13,7 @@
 # A git repository is expected to be provided, and we will get all the code
 # for the web site from there.  The repository is expected to have a single
 # application "name" and one or more "themes".  By convention, the name
-# and the theme are often the same.
+# and the theme are often the same, except the theme is capitalized.
 # For example, let's say our app name is "turtle" and our theme name is "box".
 # The repo is checked out to a folder called "~/apps/turtle".
 # This script will want to use "turtle" as the app name.
@@ -59,7 +59,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
@@ -68,16 +68,23 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 # where we expect to find our checkout folder underneath.
 full_app_dir="$BASE_APPLICATION_PATH/$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"
+  repo_name="$REPO_NAME"
+  if [ -z "$repo_name" ]; then
+    repo_name="$app_dirname"
+  fi
 fi
 if [ -z "$theme_name" ]; then
-  theme_name="$(capitalize_first_char ${app_dirname})"
+  theme_name="$THEME_NAME"
+  if [ -z "$theme_name" ]; then
+    theme_name="$(capitalize_first_char ${app_dirname})"
+  fi
 fi
 
 echo "Repository: $repo_name"
index 2b021416b3ba7fb66642af5856f11ae29c8dca6d..b71d8835fc59d35daa3de0b53a646573cd673ffe 100644 (file)
@@ -9,6 +9,11 @@ if [[ $EUID != 0 ]]; then
   exit 1
 fi
 
+if [[ ! $(hostname) == *cakelampvm* ]]; then
+  echo "This script is only designed to be run on the cakelampvm host."
+  exit 1
+fi
+
 ##############
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
@@ -89,6 +94,10 @@ chown -R developer:developer /etc/apache2 /etc/bind
 test_or_die "chown apache2 and bind to developer"
 group_perm /etc/apache2 /etc/bind 
 test_or_die "group perms on apache2 and bind"
+chown -R developer:developer /opt/feistymeow.org 
+test_or_die "chown feisty meow to developer"
+group_perm /opt/feistymeow.org 
+test_or_die "group perms on feisty meow"
 
 ##############
 
@@ -99,10 +108,6 @@ group_perm $HOME/apps
 test_or_die "group perms on fred's apps"
 harsh_perm /home/fred/.ssh
 test_or_die "harsh_perm setting on fred .ssh"
-chown -R fred:fred /opt/feistymeow.org 
-test_or_die "chown feisty meow to fred"
-group_perm /opt/feistymeow.org 
-test_or_die "group perms on feisty meow"
 group_perm /home/fred/apps/mapsdemo
 test_or_die "group perms on mapsdemo app"
 
@@ -131,14 +136,14 @@ fi
 
 # install a better editor app.
 
-sep
+#sep
 
-echo "The script is about to install the bluefish editor and some dependencies.
-If the app is not already installed, then this process takes about one minute
-on a slow home DSL internet connection..."
+#echo "The script is about to install the bluefish editor and some dependencies.
+#If the app is not already installed, then this process takes about one minute
+#on a slow home DSL internet connection..."
 
-apt-get install -y bluefish &> "/tmp/install_bluefish-$(logname).log"
-test_or_continue "installing bluefish editor"
+#apt-get install -y bluefish &> "/tmp/install_bluefish-$(logname).log"
+#test_or_continue "installing bluefish editor"
 
 ##############
 
@@ -235,7 +240,7 @@ fi
 
 ##############
 
-# fix samba configuration for (ass-headed) default of read-only in user homes.
+# fix samba configuration for screwy default of read-only in user homes.
 # why cripple a necessary feature by default?
 
 sep
@@ -243,13 +248,25 @@ sep
 pattern="[#;][[:blank:]]*read only = yes"
 replacement="read only = no"
 
-# we just always do the replacement now, after realizing the sentinel pattern
-# was acutally already in the file...  too much subtlety can get one into trouble.
+# we just always do the replacement now rather than making it conditional,
+# after realizing the sentinel pattern was actually already in the file...
+# too much subtlety can get one into trouble.
 sed -i "0,/$pattern/{s/$pattern/$replacement/}" /etc/samba/smb.conf
 test_or_die "patching samba configuration to enable write acccess on user home dirs"
+echo successfully patched the samba configuration to enable writes on user home directories. 
+
+# add in a disabling of the archive bit mapping feature, which hoses up the execute bit
+# in an attempt to save the sad old DOS archive bit across the samba connection.
+grep -q "map archive" /etc/samba/smb.conf
+# if the phrase wasn't found, we need to add it.
+if [ $? -ne 0 ]; then
+  sed -i "s/\[global\]/\[global\]\n\nmap archive = no/" /etc/samba/smb.conf
+  test_or_die "patching samba configuration to turn off archive bit mapping feature"
+  echo Successfully fixed Samba to not use the archive bit mapping feature.
+fi
+
 # sweet, looks like that worked...
 restart_samba
-echo successfully patched the samba configuration to enable writes on user home directories. 
 
 ##############
 
@@ -277,47 +294,52 @@ echo Successfully configured the apache2 environment variables needed for cakela
 
 sep
 
-echo "Checking existing swap partition configuration.
+# we will only add swap now if explicitly asked for it.  this is to avoid creating
+# a swap file where the vm is running on an SSD, since that can use up the SSD's lifespan
+# too quickly.
+if [ ! -z "$ADD_SWAP" ]; then
+  echo "Checking existing swap partition configuration.
 "
 
-# check for existing swap.
-free | grep -q "Swap:[[:blank:]]*[1-9][0-9]"
-if [ $? -ne 0 ]; then
-  # no swap in current session, so add it.
-  echo "Enabling ramdisk swap partition...
+  # check for existing swap.
+  free | grep -q "Swap:[[:blank:]]*[1-9][0-9]"
+  if [ $? -ne 0 ]; then
+    # no swap in current session, so add it.
+    echo "Enabling ramdisk swap partition...
 "
-  add_swap_mount
-  echo "
+    add_swap_mount
+    echo "
 Enabled ramdisk swap partition for current boot session."
-fi
+  fi
 
-# the above just gives this session a swap partition, but we want to have
-# the vm boot with one also.
+  # the above just gives this session a swap partition, but we want to have
+  # the vm boot with one also.
 
-# check if there is already swap mentioned in the root crontab.  we will get root's
-# crontab below since this script has to run as sudo.
-crontab -l | grep -iq add_swap_mount
-if [ $? -ne 0 ]; then
-  # no existing swap setup in crontab, so add it.
-  echo "
+  # check if there is already swap mentioned in the root crontab.  we will get root's
+  # crontab below since this script has to run as sudo.
+  crontab -l | grep -iq add_swap_mount
+  if [ $? -ne 0 ]; then
+    # no existing swap setup in crontab, so add it.
+    echo "
 Adding a boot-time ramdisk swap partition...
 "
-  # need to do it carefully, since sed won't add lines to a null file.  we thus
-  # create a temporary file to do our work in and ignore sed as a tool for this.
-  tmpfile="$(mktemp junk.XXXXXX)"
-  crontab -l 2>/dev/null >"$tmpfile"
-  echo "
+    # need to do it carefully, since sed won't add lines to a null file.  we thus
+    # create a temporary file to do our work in and ignore sed as a tool for this.
+    tmpfile="$(mktemp junk.XXXXXX)"
+    crontab -l 2>/dev/null >"$tmpfile"
+    echo "
 # need to explicitly set any variables we will use.
 FEISTY_MEOW_APEX=${FEISTY_MEOW_APEX}
 # add swap space to increase memory available.
 @reboot bash $FEISTY_MEOW_APEX/scripts/system/add_swap_mount.sh
 " >>"$tmpfile"
-  # now install our new version of the crontab.
-  crontab "$tmpfile"
-  rm "$tmpfile"
+    # now install our new version of the crontab.
+    crontab "$tmpfile"
+    rm "$tmpfile"
 
-  echo "
+    echo "
 Added boot-time ramdisk swap partition to crontab for root."
+  fi
 fi
 
 ##############
@@ -326,7 +348,31 @@ sep
 
 echo Adding site avenger packages to composer.
 # add in site avenger dependencies so we can build avcore properly.
-composer config -g repositories.siteavenger composer https://packages.siteavenger.com/
+pushd ~ &>/dev/null
+sudo -u $(logname) composer config -g repositories.siteavenger composer https://packages.siteavenger.com/
+popd &>/dev/null
+
+##############
+
+# make the apache umask set group permissions automatically, so we stop having weird
+# permission issues on temp dirs.
+
+sep
+
+grep -q "umask" /etc/apache2/envvars
+if [ $? -eq 0 ]; then
+  # already present.
+  echo the umask configuration for apache already appears to be set.
+else
+  echo "
+
+# set umask to enable group read/write on files and directories.
+umask 002
+
+" >> /etc/apache2/envvars
+  restart_apache
+  echo "successfully changed apache umask configuration to enable group read/write"
+fi
 
 ##############
 ##############
index 94a4f792d8bef9638cfc14d506a6db48e9b355a5..f824776573539e0cc446aa4d506bb355aae8283b 100644 (file)
@@ -28,7 +28,7 @@ test_or_die "loading site management configuration from: $SITE_MANAGEMENT_CONFIG
 export NO_CHECKIN_VENDOR=true
 
 # tests that the main storage folder for apps exists.
-function check_application_dir()
+function check_apps_root()
 {
   local appdir="$1"; shift
   if [ ! -d "$appdir" ]; then
@@ -63,6 +63,7 @@ the standard pattern for cakephp projects."
   source "$SITE_MANAGEMENT_CONFIG_FILE"
   test_or_die "loading site management configuration from: $SITE_MANAGEMENT_CONFIG_FILE"
 
+  return 0
 }
 
 # this function will seek out top-level directories in the target directory passed in.
@@ -100,14 +101,14 @@ function find_app_folder()
     options=( $(find "$appsdir" -mindepth 1 -maxdepth 1 -type d -exec basename {} ';') "Quit")
     select app_dirname in "${options[@]}"; do
       case $app_dirname in
-        "Quit") echo ; echo "Quitting from the script."; exit 1; ;;
+        "Quit") echo ; echo "Quitting from the script."; return 1; ;;
         *) echo ; echo "You picked folder '$app_dirname'" ; break; ;;
       esac
     done
     if [ -z "$app_dirname" ]; then
       echo "The folder was not provided.  This script needs a directory name"
       echo "within which to initialize the site."
-      exit 1
+      return 1
     fi
     PS3="$holdps3"
   fi
@@ -115,9 +116,11 @@ function find_app_folder()
   test_or_die "Testing application folder: $app_dirname"
 
   echo "Application folder is: $app_dirname"
+  return 0
 }
 
-# ensures that the app directory name is valid.
+# ensures that the app directory name is valid and then loads the config
+# for the app (either via a specific file or using the defaults).
 function test_app_folder()
 {
   local appsdir="$1"; shift
@@ -137,20 +140,22 @@ function test_app_folder()
 # eases some permissions to enable apache to write log files and do other shopkeeping.
 function fix_site_perms()
 {
-  local site_dir="$1"; shift
+  local app_dir="$1"; shift
+
+  local site_dir="$app_dir/$CHECKOUT_DIR_NAME"
 
   if [ -f "$site_dir/bin/cake" ]; then
-    chmod -R a+rx "$site_dir/bin/cake"
+    sudo chmod -R a+rx "$site_dir/bin/cake"
     test_or_die "Enabling execute bit on cake binary"
   fi
 
   if [ -d "$site_dir/logs" ]; then
-    chmod -R g+w "$site_dir/logs"
+    sudo chmod -R g+w "$site_dir/logs"
     test_or_die "Enabling group write on site's Logs directory"
   fi
 
   if [ -d "$site_dir/tmp" ]; then
-    chmod -R g+w "$site_dir/tmp"
+    sudo chmod -R g+w "$site_dir/tmp"
     test_or_die "Enabling group write on site's tmp directory"
   fi
 }
@@ -226,8 +231,10 @@ var full_app_dir checkout_dirname repo_root repo_name
     test_or_die "Git clone of repository: $repo_name"
   fi
 
-  fix_site_perms "$complete_path"
+#not doing this here since powerup uses this and has no sudo.
+  #fix_site_perms "$complete_path"
 
+#unused?
   # construct the full path to where the app will actually live.
   site_store_path="$complete_path"
 
@@ -364,13 +371,44 @@ function fix_appdir_ownership()
   # go with the default user running the script.
   user_name="$USER"
   if [ ! -z "$user_name" -a "$user_name" != "root" ]; then
-    echo "Chowning the apps folder to be owned by: $user_name"
+    echo "Chowning the app folder to be owned by: $user_name"
 #hmmm: have to hope for now for standard group named after user 
-    chown -R "$user_name:$user_name" "$combo"
+    sudo chown -R "$user_name:$user_name" "$combo"
     test_or_die "Chowning $combo to be owned by $user_name"
   else
     echo "user name failed checks for chowning, was found as '$user_name'"
   fi
+
+  # 
+#probably not enough for path!
+  fix_site_perms "$combo"
 }
 
+# Jumps to an application directory given the app name.  If no app name is
+# given, it will show a menu to pick the app.
+function switch_to()
+{
+  # check for parameters.
+  app_dirname="$1"; shift
+
+  check_apps_root "$BASE_APPLICATION_PATH"
+
+  # find proper webroot where the site will be initialized.
+  if [ -z "$app_dirname" ]; then
+    # no dir was passed, so guess it.
+    find_app_folder "$BASE_APPLICATION_PATH"
+  else
+    test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
+  fi
+  if [ $? -ne 0 ]; then
+    echo "Could not locate that application directory"
+    return 1
+  fi
+
+  # where we expect to find our checkout folder underneath.
+  full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
+
+  cd $full_app_dir/$CHECKOUT_DIR_NAME
+  pwd
+}
 
index 1336a891917b6871f3bb6f3150311203dcf597af..52e2e13d6b701455695ec0f970f356ecc0ea59e2 100644 (file)
@@ -19,7 +19,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
@@ -28,6 +28,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 # where we expect to find our checkout folder underneath.
 full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
index 282d0cdc060f93a7d25746a89f32f43b12c078c6..e2a70593334ebffa4a30416fa5f377eedab1e567 100644 (file)
@@ -19,7 +19,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
@@ -28,6 +28,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 # where we expect to find our checkout folder underneath.
 full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
index cd2f689056cb674cb4a075fd7fdd2a3ae6749df9..3ba100f36a7471bf39cc9bec7f7da9550c489387 100644 (file)
@@ -55,7 +55,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
@@ -64,6 +64,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 #echo "!! domain being added is: $DOMAIN_NAME"
 
@@ -85,6 +86,11 @@ fi
 
 sep
 
+# run this prior to the checkout to fix perms.
+fix_appdir_ownership "$BASE_APPLICATION_PATH" "$APPLICATION_NAME" 
+
+sep
+
 #echo about to do powerup with: app="$APPLICATION_NAME" repo="$REPO_NAME" theme="$THEME_NAME"
 #echo default repo is "$DEFAULT_REPOSITORY_ROOT" 
 
@@ -92,12 +98,6 @@ powerup "$APPLICATION_NAME" "$REPO_NAME" "$THEME_NAME"
 
 sep
 
-# hmmm: pass the real user name who should own the files?
-# hmmm: "$(logname)" $USER works, but logname wasn't?
-fix_appdir_ownership "$BASE_APPLICATION_PATH" "$APPLICATION_NAME" 
-
-sep
-
 echo "
 Finished standing up the full domain and site for: ${app_dirname}
 The domain name is: $DOMAIN_NAME
index 5bfcbd4699b9a01696af8f4a85ebd8e6b9bb2252..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,6 +56,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 sep
 
index b15d0efef2cb9905869811af115eb70faed09acb..7790fe884fe87a03602939d89a10c29aebf0306b 100644 (file)
@@ -3,8 +3,13 @@ source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
 
 sudo apt-get update -y
 test_or_die "problem while doing 'apt-get update'"
-# new magic to tell dpkg to go with existing config files.  let's see if it works!
-sudo apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold"
+
+# newest magic to tell dpkg to go with existing config files and force non-interactive version.
+sudo bash -c "\
+  export DEBIAN_FRONTEND=noninteractive; \
+  apt-get dist-upgrade -y -o Dpkg::Options::=\"--force-confdef\" \
+     -o Dpkg::Options::=\"--force-confold\"; \
+"
 test_or_die "problem while doing 'apt-get dist-upgrade'"