# 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.
# 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.
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
# 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)"
# 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\""
##############
##############
-# 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
##############
>> "$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\"?" \
+++ /dev/null
-#!/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
-
-##############
-
#!/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
# 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"
# 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
}
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
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"
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}'."
--- /dev/null
+#!/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
+
+##############
+
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.
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.
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.
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.
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
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"
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
+"
# 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.
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.
#
# 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).
${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.
////////////////////////////////////////////////////////////////////////////
" >> /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.
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()
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.
+
+
+
+