Merge branch 'dev' of feistymeow.org:feisty_meow into dev
authorChris Koeritz <fred@gruntose.com>
Tue, 14 Nov 2017 03:26:09 +0000 (03:26 +0000)
committerChris Koeritz <fred@gruntose.com>
Tue, 14 Nov 2017 03:26:09 +0000 (03:26 +0000)
16 files changed:
infobase/feisty_inits/dot.bashrc-root
production/feisty_meow_config.ini
readme.txt
scripts/agenda/info_overload_report.sh
scripts/core/common.alias
scripts/core/connect_feisty_meow.sh
scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh [deleted file]
scripts/site_avenger/config/default.app
scripts/site_avenger/config/mapsdemo.app
scripts/site_avenger/powerup.sh
scripts/site_avenger/revamp_cakelampvm.sh [new file with mode: 0644]
scripts/site_avenger/shared_site_mgr.sh
scripts/site_avenger/standup.sh
scripts/system/add_apache_site.sh
scripts/system/add_domain.sh
walrus/utilities/multimedia/multimedia_tools.txt

index 453a0fbd472e64b4557e61728850842eb2dd7cc5..e0facb150007d8b81a7e37f0802fc31e5fccf806 100644 (file)
@@ -24,7 +24,7 @@ export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow"
 
 # the "fredme" macro enables the feisty_meow environment.
 alias fredme='source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"'
-# synonym for fredme.
+# synonym for fredme which makes more sense to most people.
 alias feistyme='source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"'
 
 # if not commented out, then feisty meow will run all the unit tests during builds.
index e59199d17313e41ecd12c07236a6246a58212f0e..de81f33b401d455bde0eabe1c347cc6f7642b2b2 100644 (file)
@@ -3,7 +3,7 @@
 # specifies the version of the code that is being constructed here.
 major=2
 minor=140
-revision=97
+revision=98
 build=420
 
 # specifies the remainder of the version record info.
index 0fda046ea9e12470e4bf01335b68dc7ea8888cd7..ca3b745926850fed6a873ed75741dbbe2fd02423 100644 (file)
@@ -34,6 +34,10 @@ Connect the feisty meow scripts to your login script (in ~/.bashrc).
 Note that this actually modifies ~/.bashrc.  This step is only needed once.
 # bash /opt/feistymeow.org/feisty_meow/scripts/core/connect_feisty_meow.sh
 
+| For the root user, you can pass a flag '--root' to the connect_feisty_meow
+| script.  This will add an alias for 'feistyme' which loads the feisty meow
+| scripts on demand (instead of automatically upon login).
+
 Load the script environment into the current shell.  This can be done for
 any new shell.  This is idempotent, so it does no harm to run it again.
 Note that you should not need this step if you connected feisty meow to
index a2f89349398941c57c4e804dc18cfac1cb0511a3..c6dbbafb01d003aa578677235c4cc89dca1068d3 100644 (file)
@@ -116,6 +116,9 @@ analyze_hierarchy_and_report ~/cloud/urgent "high priority (aieeee!)"
 # notes are individual files of tasks, usually, although some are combined.
 analyze_hierarchy_and_report ~/cloud/grunty_notes "grunty notes (externalities)"
 
+# web site development tasks.
+analyze_hierarchy_and_report ~/cloud/webular "web design (ideas and tasks)"
+
 # feisty notes are about feisty meow(r) concerns ltd codebase development.
 analyze_hierarchy_and_report ~/cloud/feisty_notes "feisty meow notes (mondo coding)"
 
index fae1b6c6e09032d4256e9c0b6cbf01cf7c1b7baa..9c94ef167597c8075920465714826f8220784dcd 100644 (file)
@@ -102,10 +102,10 @@ define_yeti_alias feisty_branch='pushd $FEISTY_MEOW_APEX ; git branch ; popd'
 # some important retreads on aliases that provide a sudo-ized version of other scripts.
 
 define_yeti_alias snarf_linux_config="sudo -E PERLLIB=\$PERLLIB perl \$FEISTY_MEOW_SCRIPTS/archival/snarf_linux_config.pl"
-define_yeti_alias standup="sudo bash \"$FEISTY_MEOW_SCRIPTS/site_avenger/standup.sh\""
+#no, does its own sudo wrangling.edefine_yeti_alias standup="sudo bash \"$FEISTY_MEOW_SCRIPTS/site_avenger/standup.sh\""
 
 #hmmm: some magma intrusions from the fred customizations...
-define_yeti_alias revamp_web_permissions="sudo bash \"$FEISTY_MEOW_SCRIPTS/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh\""
+define_yeti_alias revamp_cakelampvm="sudo bash \"$FEISTY_MEOW_SCRIPTS/site_avenger/revamp_cakelampvm.sh\""
 
 ##############
 
@@ -133,11 +133,10 @@ define_yeti_alias why='echo We all wonder what the point of the universe is at t
 
 ##############
 
-# remove the fredization macro if it was defined, helping to avoid running
-# the shell scripts twice for users like root that don't always load this
-# stuff.
-unalias fredme &>/dev/null
-unalias feistyme &>/dev/null
+# remove the "fredization" or "feistymeowization" macros if they're defined,
+# which reduces the chance of loading the shell environment twice for users
+# like root that don't load feisty meow automatically.
+unalias fredme feistyme &>/dev/null
 
 ##############
 
index 6a226b8dfe3e8c15b4c670e084a2f89154922c58..6f6ffd3840536016553661e94eb259b9133ac001 100644 (file)
@@ -27,10 +27,12 @@ else
         >> "$HOME/.bashrc"
     echo "Feisty Meow is now configured in '~/.bashrc' for standard users."
   else
-    # stuff the root user init file into .bashrc.  this one doesn't automatically load
-    # feisty meow.  instead, it provides a fredme macro to load the feisty meow scripts.
-    # fredme comes from the main author being fred t. hamster.  we have since added a
-    # feistyme macro too, to be less personalized...
+    # stuff the root user init file into .bashrc.  this one doesn't
+    # automatically load the feisty meow scripts.  instead, there is a macro
+    # (uhh, an alias) that loads the feisty meow scripts.  the 'fredme' macro
+    # comes from the main author of feisty meow, named fred t. hamster.  we
+    # have since added a 'feistyme' macro too, to be slightly less
+    # idiosyncratic, as if that were possible.
     cat $FEISTY_MEOW_APEX/infobase/feisty_inits/dot.bashrc-root |
       sed -e \
         "s?FEISTY_MEOW_APEX=\".*\"?FEISTY_MEOW_APEX=\"$FEISTY_MEOW_APEX\"?" \
diff --git a/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh b/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh
deleted file mode 100644 (file)
index 2081b8f..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-# fixes the cakelampvm permissions according to the way.
-
-##############
-
-if [[ $EUID != 0 ]]; then
-  echo "This script must be run as root or sudo."
-  exit 1
-fi
-
-##############
-
-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"
-
-##############
-
-# fix up the main web storage.
-chown -R www-data:www-data /var/www 
-group_perm /var/www 
-
-##############
-
-# set up access on some important folders for the developer user.
-chown -R developer:developer /home/developer
-harsh_perm /home/developer/.ssh
-chown -R developer:developer /opt/feistymeow.org 
-group_perm /opt/feistymeow.org 
-chown -R developer:developer /etc/apache2 /etc/bind 
-group_perm /etc/apache2 /etc/bind 
-
-##############
-
-# fix perms for fred user.
-chown -R fred:fred /home/fred /home/archives/stuffing 
-harsh_perm /home/fred/.ssh
-
-##############
-
index 65e782d7b02664a3a08cf7cbf340d564b0a680e7..a7b9e90982241e8b1433fb38c6d3d29ae35e7f95 100644 (file)
@@ -1,42 +1,38 @@
 #!/bin/bash
 
-# this config file provides the default values for the variables used in our site management scripts.
+# provides the default values for the variables used in our site management scripts.
+
+# config files for site avenger apps usually override nothing, since we
+# auto-construct the app name and domain.
+# if they do need to override anything, they can just specify replacement
+# values for the variables in this file.
 
 ####
 
 # basic information that is constant for all site avenger sites.
 
-APPLICATION_DIR="$HOME/apps"
-DEFAULT_REPOSITORY_ROOT="git@github.com:kwentworth"
-CHECKOUT_DIR_NAME="avenger5"
-
-####
-
-# config files for site avenger apps usually override nothing, since we
-# auto-construct the app name and domain.  but if they do need to override
-# anything, it will be below this point in the file.
-# the derived config file should include the basic configs like so:
-#
-#   source "$WORKDIR/config/default.app"
+export APPLICATION_DIR="$HOME/apps"
+export DEFAULT_REPOSITORY_ROOT="git@github.com:kwentworth"
+export CHECKOUT_DIR_NAME="avenger5"
 
 ####
 
 # deployment information for the application / site.
 
-APPLICATION_NAME="${app_dirname}"
+export APPLICATION_NAME="${app_dirname}"
 
 echo app name was computed as $APPLICATION_NAME
 
 # change this if the site is on the "real" internet.
-DOMAIN_NAME="${app_dirname}.vm"
+export DOMAIN_NAME="${app_dirname}.vm"
 
 echo domain name was computed as $DOMAIN_NAME
 
-REPO_NAME="${app_dirname}.git"
+export REPO_NAME="${app_dirname}"
 
 echo repo name was computed as $REPO_NAME
 
-THEME_NAME="$(capitalize_first_char "${app_dirname}.git")"
+export THEME_NAME="$(capitalize_first_char "${app_dirname}")"
 
 echo theme name was computed as $THEME_NAME
 
index a2bca519b1b348ffff577eff32c0d298f2532252..34fe6ce89fc9e9873ac88225fada9c2f3a228674 100644 (file)
@@ -3,8 +3,8 @@
 # a special override for the mapsdemo site, which we want to put in as
 # a subdomain of the cakelampvm domain.
 
-source "$WORKDIR/config/default.app"
+export DOMAIN_NAME="${APPLICATION_NAME}.cakelampvm.com"
 
-DOMAIN_NAME="${APPLICATION_NAME}.cakelampvm.com"
 
+echo "*** overrode domain name as: $DOMAIN_NAME"
 
index 998fcad57b4aae9517737ab6ea75bacb654b186e..c67bd25a689cf5f7613727c6bdc076165049ac3d 100644 (file)
 # start with.  The concept of the theme comes from cakephp.
 
 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"
 
 ############################
 
 function print_instructions()
 {
   echo
-  echo "$(basename $0 .sh) [app dirname] [repository] [theme name]"
+  echo "$(basename $0 .sh) [app dirname] [repository] [theme name] "
+#[user name]
   echo
   echo "All parameters are optional, and intelligent guesses for them will be made."
   echo
   echo "app dirname: The folder where the app will be stored."
   echo "repository: The name of the git repository (short version, no URL)."
   echo "theme name: The name to use for the cakephp theme."
+#  echo "user name: The name of the user to chown the checkout to."
   echo
   exit 0
 }
@@ -46,6 +51,9 @@ function print_instructions()
 app_dirname="$1"; shift
 repo_name="$1"; shift
 theme_name="$1"; shift
+#user_name="$1"; shift
+
+#echo "*** user name is $user_name"
 
 if [ "$app_dirname" == "-help" -o "$app_dirname" == "--help" ]; then
   print_instructions
@@ -80,6 +88,9 @@ echo "Repository: $repo_name"
 echo "Theme name: $theme_name"
 sep
 
+echo in powerup before update repo with:
+var CHECKOUT_DIR_NAME DEFAULT_REPOSITORY_ROOT
+
 # 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"
@@ -96,5 +107,15 @@ create_site_links "$site_store_path" "$theme_name"
 
 sep
 
+#if [ ! -z "$user_name" ]; then
+#  echo "Chowning the apps 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" "$APPLICATION_DIR"
+#  test_or_die "Chowning $APPLICATION_DIR to be owned by $user_name"
+#fi
+
+sep
+
+
 echo "Finished powering up the site in '${app_dirname}'."
 
diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh
new file mode 100644 (file)
index 0000000..8e87c65
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+# fixes the cakelampvm permissions according to the way.
+
+##############
+
+if [[ $EUID != 0 ]]; then
+  echo "This script must be run as root or sudo."
+  exit 1
+fi
+
+##############
+
+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"
+
+##############
+
+# fix up the main web storage.
+chown -R www-data:www-data /var/www 
+group_perm /var/www 
+
+##############
+
+# set up access on some important folders for the developer user.
+chown -R developer:developer /home/developer
+harsh_perm /home/developer/.ssh
+chown -R developer:developer /opt/feistymeow.org 
+group_perm /opt/feistymeow.org 
+chown -R developer:developer /etc/apache2 /etc/bind 
+group_perm /etc/apache2 /etc/bind 
+
+##############
+
+# fix perms for fred user.
+chown -R fred:fred /home/fred /home/archives/stuffing 
+harsh_perm /home/fred/.ssh
+
+##############
+
index b30ca82dbb600bafdabd11d5be5fecd8810c89f2..56e658e2d633201244ee88fdca034b8fa7680ccc 100644 (file)
@@ -16,6 +16,8 @@ source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
 export SITE_MANAGEMENT_CONFIG_FILE
 if [ -z "$SITE_MANAGEMENT_CONFIG_FILE" ]; then
   SITE_MANAGEMENT_CONFIG_FILE="$WORKDIR/config/default.app"
+  echo "Site management config file was not set.  Using default:"
+  echo "  $SITE_MANAGEMENT_CONFIG_FILE"
 fi
 
 # load in at least the default version to get us moving.
@@ -36,6 +38,33 @@ function check_application_dir()
   fi
 }
 
+# tries to find an appropriate config file for the application.
+function locate_config_file()
+{
+  local app_dirname="$1"; shift
+
+  local configfile="$WORKDIR/config/${app_dirname}.app"
+echo hoping config file would be: $configfile
+  if [ ! -f "$configfile" ]; then
+    # this is not a good config file.  we can't auto-guess the config.
+    echo -e "
+There is no specific site configuration file in:
+  $configfile
+We will continue onward using the default and hope that this project follows
+the standard pattern for cakephp projects."
+    # we'll pull in the default config file we set earlier; this will
+    # reinitialize some variables based on the app name.
+  else
+    # they gave us a valid config file.  let's try using it.
+    export SITE_MANAGEMENT_CONFIG_FILE="$configfile"
+  fi
+
+  # try to load the config.
+  source "$SITE_MANAGEMENT_CONFIG_FILE"
+  test_or_die "loading site management configuration from: $SITE_MANAGEMENT_CONFIG_FILE"
+
+}
+
 # this function will seek out top-level directories in the target directory passed in.
 # if there is only one directory, then it is returned (in the app_dirname variable).
 # otherwise, the user is asked which directory to use.
@@ -86,25 +115,6 @@ function find_app_folder()
   test_or_die "Testing application folder: $app_dirname"
 
   echo "Application folder is: $app_dirname"
-
-  local configfile="$WORKDIR/config/${app_dirname}.app"
-  if [ ! -f "$configfile" ]; then
-    # this is not a good config file.  we can't auto-guess the config.
-    echo -e "
-There is no specific site configuration file in:
-  $configfile
-We will continue onward using the default and hope that this project follows
-the standard pattern for cakephp projects."
-    # we'll pull in the default config file we set earlier; this will
-    # reinitialize some variables based on the app name.
-  else
-    # they gave us a valid config file.  let's try using it.
-    SITE_MANAGEMENT_CONFIG_FILE="$configfile"
-  fi
-
-  # try to load the config.
-  source "$SITE_MANAGEMENT_CONFIG_FILE"
-  test_or_die "loading site management configuration from: $SITE_MANAGEMENT_CONFIG_FILE"
 }
 
 # ensures that the app directory name is valid.
@@ -120,6 +130,8 @@ function test_app_folder()
     mkdir "$combo"
     test_or_die "Making application directory when not already present"
   fi
+
+  locate_config_file "$dir"
 }
 
 # eases some permissions to enable apache to write log files and do other shopkeeping.
@@ -167,6 +179,9 @@ function update_repo()
   local repo_root="$1"; shift
   local repo_name="$1"; shift
 
+echo here are parms in update repo:
+var full_app_dir checkout_dirname repo_root repo_name
+
   # forget any prior value, since we are going to validate the path.
   unset site_store_path
 
index 56684b9cefd8d3bbdc06bb433f6345cb05be7d71..ae64d2b877b60d9daf7d86c1aa904f5678e24f3e 100644 (file)
@@ -47,10 +47,11 @@ elif [ -z "$app_dirname" ]; then
   print_instructions
 fi
 
-if [[ $EUID != 0 ]]; then
-  echo "This script must be run as root or sudo."
-  exit 1
-fi
+#we will require sudo later.
+#if [[ $EUID != 0 ]]; then
+#  echo "This script must be run as root or sudo."
+#  exit 1
+#fi
 
 source "$WORKDIR/shared_site_mgr.sh"
 
@@ -66,21 +67,29 @@ else
   test_app_folder "$APPLICATION_DIR" "$app_dirname"
 fi
 
-add_domain "$DOMAIN_NAME"
+#echo "!! domain being added is: $DOMAIN_NAME"
+
+sudo bash "$FEISTY_MEOW_SCRIPTS/system/add_domain.sh" "$DOMAIN_NAME"
 test_or_die "Setting up domain: $DOMAIN_NAME"
 
 sep
 
-add_apache_site "$APPLICATION_NAME" "$DOMAIN_NAME"
+sudo bash "$FEISTY_MEOW_SCRIPTS/system/add_apache_site.sh" "$APPLICATION_NAME" "$DOMAIN_NAME"
 test_or_die "Setting up apache site for: $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" 
+
 powerup "$APPLICATION_NAME" "$REPO_NAME" "$THEME_NAME"
+# pass the real user name who should own the files.
+# "$(logname)"
 
 sep
 
 echo "
-Finished standing up the full domain and site in:
-${app_dirname}"
+Finished standing up the full domain and site for: ${app_dirname}
+The domain name is: $DOMAIN_NAME
+"
 
index 647b87b9d8a79460679ab302371c4abe75b72a70..57b5d519be85af004ec2f17bcae60036bc25a2c8 100644 (file)
@@ -4,7 +4,9 @@
 
 # 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.
-source "$WORKDIR/../core/launch_feisty_meow.sh"
+export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
+
+source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
 
 # some convenient defaults for our current usage.
 
@@ -64,6 +66,9 @@ function write_apache_config()
     Include /etc/apache2/conf-library/rewrite-enabling.conf
 </VirtualHost>
 " >"$site_config" 
+
+  chown "$(logname):$(logname)" "$site_config"
+  test_or_die "setting ownership on: $site_config"
 }
 
 # turns on the config file we create above for apache.
index 3c9df992983372a976865d7e91039c87b5f2d145..80ebb2f37d0563e6d0d9b0d768d1e9b80a0797c3 100644 (file)
@@ -8,13 +8,19 @@
 #
 # Author: Chris Koeritz
 
+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"
+
 # some defaults that are convenient for current purposes.
-# hmmm: these would need to be parameterized somehow for this script to become really general.
+
+# hmmm: !!! these would need to be parameterized somehow for this script to become really general.
 
 # in our scheme, the single IP address that all our domains map to.
 IP_ADDRESS="10.28.42.20"
 # the email address (where first dot is replaced by @) for the administrator of the domain.
-SERVER_ADMIN="fred.cakelampvm.com"
+SERVER_ADMIN="developer.cakelampvm.com"
 # the name of the name server for the new domains (should already be configured).
 MAIN_NAME_SERVER="ns.cakelampvm.com"
 # the name of the mail server for a new domain (should already be configured).
@@ -57,6 +63,10 @@ function write_new_domain_file()
 ${domain_name}.        IN A    ${IP_ADDRESS}
        IN HINFO        \"linux server\" \"${DISTRO}\"
 " >"$domain_file"
+
+  # our personalized configuration approach wants the real owner to own the file.
+  chown "$(logname):$(logname)" $domain_file
+  test_or_die "setting ownership on: $domain_file"
 }
 
 # hooks up a new config file into bind's list of zones.
@@ -80,6 +90,11 @@ zone \"${domain_name}\" in {
 ////////////////////////////////////////////////////////////////////////////
 
 " >> /etc/bind/named.conf.local
+
+  # keep ownership for the real user.
+  chown "$(logname):$(logname)" /etc/bind/named.conf.local
+  test_or_die "setting ownership on: /etc/bind/named.conf.local"
+
 }
 
 # adds a new subdomain under a containing domain.
@@ -117,6 +132,9 @@ ${subdomain}.${containing_domain}.    IN A    ${IP_ADDRESS}
         IN HINFO \"linux server\" \"${DISTRO}\"
 " >> /etc/bind/${containing_domain}.conf
 
+  # keep ownership for real user.
+  chown "$(logname):$(logname)" "/etc/bind/${containing_domain}.conf"
+  test_or_die "setting ownership on: /etc/bind/${containing_domain}.conf"
 }
 
 function restart_bind()
index 9c98033fe7031b946f892ffe9f9ead4a995980fd..275bbde0bb51d77b7639dbda413290158d12f082 100644 (file)
@@ -54,4 +54,20 @@ if you need to jam a bunch of videos together, crossfade them, and that kind of
 then try openshot.  it also supports simple saving with different quality levels, which
 lets you drop a bunch of size at the expense of the picture.  sometimes needed.
 
+---------------------------
+music collection management
+---------------------------
+
+dupeguru:
+found this to be pretty helpful in finding my duplicate songs.  it is able to analyze
+when the files are the same, even if their names don't match.
+check: did it even compare by metadata?  not remembering currently.
+
+fdupes:
+another useful tool for finding duplicate tracks in a music collection, but relies on exact
+matches in the names(?).  was not so powerful as dupeguru, but still useful.
+
+
+
+