From 5af202498131eb5eed099b84187e59889303faa8 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sun, 12 Nov 2017 05:03:37 -0500 Subject: [PATCH] getting changes from cakelampvm something has been preventing us from checking in, where a weird error about www-data is being thrown. --- .../bashisms/bashrc_with_localtmp_code.sh | 0 .../comma_separated_string_to_array.sh | 0 .../examples}/bashisms/dot.bash_logout | 0 .../bashisms/example_getops_parsing.txt | 0 .../examples}/bashisms/fred_techniques.txt | 0 ...s_possible_to_cleanly_copy_array_elems.txt | 0 .../bashisms/qs_handy_unix_examples.sh | 0 .../examples}/bashisms/script_location.sh | 0 .../examples}/building/vs_var.bat | 0 .../examples}/cpp_grammar_code/CxxLexer.cpp | 0 .../examples}/cpp_grammar_code/CxxLexer.l | 0 .../examples}/cpp_grammar_code/CxxLexing.cxx | 0 .../examples}/cpp_grammar_code/CxxLexing.hxx | 0 .../examples}/cpp_grammar_code/CxxParser.cpp | 0 .../examples}/cpp_grammar_code/CxxParser.y | 0 .../examples}/cpp_grammar_code/CxxParsing.cxx | 0 .../examples}/cpp_grammar_code/CxxParsing.hxx | 0 .../examples}/cpp_grammar_code/CxxToken.cpp | 0 .../examples}/cpp_grammar_code/CxxToken.cxx | 0 .../examples}/cpp_grammar_code/CxxToken.hxx | 0 .../examples}/cpp_grammar_code/README | 0 .../examples}/cpp_grammar_code/index.html | 0 .../examples}/cpp_grammar_code/makefile | 0 .../examples}/cpp_grammar_code/makefile.gmake | 0 .../cpp_grammar_code/makefile.macros | 0 .../examples}/cpp_grammar_code/makefile.unix | 0 .../willink_note_re_grammar.txt | 0 .../graphics/pdf_picture_extractor.sh | 0 .../examples}/legacy/gpg-daemon-launcher.sh | 0 .../examples}/legacy/template.pl | 0 .../examples}/os_related/OS_crusher.bat | 0 .../examples}/os_related/OS_crusher.sh | 0 .../examples}/os_related/block_ip_address.sh | 0 .../os_related/example_registry_ops.sh | 0 .../examples}/os_related/set_tcp_config.sh | 0 .../examples}/os_related/user_sudoing.sh | 0 .../perlisms/example_perl_array_and_hash.pl | 0 {examples => infobase/examples}/readme.txt | 0 .../ripping_and_burning_examples.txt | 0 scripts/core/common.alias | 2 +- scripts/core/generate_aliases.pl | 5 ++++ .../cakelampvm/revamp_web_permissions.sh | 30 +++++++++---------- scripts/site_avenger/standup.sh | 2 +- scripts/system/add_apache_site.sh | 2 +- scripts/system/add_domain.sh | 2 +- 45 files changed, 23 insertions(+), 20 deletions(-) rename {examples => infobase/examples}/bashisms/bashrc_with_localtmp_code.sh (100%) rename {examples => infobase/examples}/bashisms/comma_separated_string_to_array.sh (100%) rename {examples => infobase/examples}/bashisms/dot.bash_logout (100%) rename {examples => infobase/examples}/bashisms/example_getops_parsing.txt (100%) rename {examples => infobase/examples}/bashisms/fred_techniques.txt (100%) rename {examples => infobase/examples}/bashisms/it_is_possible_to_cleanly_copy_array_elems.txt (100%) rename {examples => infobase/examples}/bashisms/qs_handy_unix_examples.sh (100%) rename {examples => infobase/examples}/bashisms/script_location.sh (100%) rename {examples => infobase/examples}/building/vs_var.bat (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxLexer.cpp (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxLexer.l (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxLexing.cxx (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxLexing.hxx (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxParser.cpp (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxParser.y (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxParsing.cxx (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxParsing.hxx (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxToken.cpp (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxToken.cxx (100%) rename {examples => infobase/examples}/cpp_grammar_code/CxxToken.hxx (100%) rename {examples => infobase/examples}/cpp_grammar_code/README (100%) rename {examples => infobase/examples}/cpp_grammar_code/index.html (100%) rename {examples => infobase/examples}/cpp_grammar_code/makefile (100%) rename {examples => infobase/examples}/cpp_grammar_code/makefile.gmake (100%) rename {examples => infobase/examples}/cpp_grammar_code/makefile.macros (100%) rename {examples => infobase/examples}/cpp_grammar_code/makefile.unix (100%) rename {examples => infobase/examples}/cpp_grammar_code/willink_note_re_grammar.txt (100%) rename {examples => infobase/examples}/graphics/pdf_picture_extractor.sh (100%) rename {examples => infobase/examples}/legacy/gpg-daemon-launcher.sh (100%) rename {examples => infobase/examples}/legacy/template.pl (100%) rename {examples => infobase/examples}/os_related/OS_crusher.bat (100%) rename {examples => infobase/examples}/os_related/OS_crusher.sh (100%) rename {examples => infobase/examples}/os_related/block_ip_address.sh (100%) rename {examples => infobase/examples}/os_related/example_registry_ops.sh (100%) rename {examples => infobase/examples}/os_related/set_tcp_config.sh (100%) rename {examples => infobase/examples}/os_related/user_sudoing.sh (100%) rename {examples => infobase/examples}/perlisms/example_perl_array_and_hash.pl (100%) rename {examples => infobase/examples}/readme.txt (100%) rename {examples => infobase/examples}/ripping_and_burning_examples.txt (100%) mode change 100755 => 100644 scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh diff --git a/examples/bashisms/bashrc_with_localtmp_code.sh b/infobase/examples/bashisms/bashrc_with_localtmp_code.sh similarity index 100% rename from examples/bashisms/bashrc_with_localtmp_code.sh rename to infobase/examples/bashisms/bashrc_with_localtmp_code.sh diff --git a/examples/bashisms/comma_separated_string_to_array.sh b/infobase/examples/bashisms/comma_separated_string_to_array.sh similarity index 100% rename from examples/bashisms/comma_separated_string_to_array.sh rename to infobase/examples/bashisms/comma_separated_string_to_array.sh diff --git a/examples/bashisms/dot.bash_logout b/infobase/examples/bashisms/dot.bash_logout similarity index 100% rename from examples/bashisms/dot.bash_logout rename to infobase/examples/bashisms/dot.bash_logout diff --git a/examples/bashisms/example_getops_parsing.txt b/infobase/examples/bashisms/example_getops_parsing.txt similarity index 100% rename from examples/bashisms/example_getops_parsing.txt rename to infobase/examples/bashisms/example_getops_parsing.txt diff --git a/examples/bashisms/fred_techniques.txt b/infobase/examples/bashisms/fred_techniques.txt similarity index 100% rename from examples/bashisms/fred_techniques.txt rename to infobase/examples/bashisms/fred_techniques.txt diff --git a/examples/bashisms/it_is_possible_to_cleanly_copy_array_elems.txt b/infobase/examples/bashisms/it_is_possible_to_cleanly_copy_array_elems.txt similarity index 100% rename from examples/bashisms/it_is_possible_to_cleanly_copy_array_elems.txt rename to infobase/examples/bashisms/it_is_possible_to_cleanly_copy_array_elems.txt diff --git a/examples/bashisms/qs_handy_unix_examples.sh b/infobase/examples/bashisms/qs_handy_unix_examples.sh similarity index 100% rename from examples/bashisms/qs_handy_unix_examples.sh rename to infobase/examples/bashisms/qs_handy_unix_examples.sh diff --git a/examples/bashisms/script_location.sh b/infobase/examples/bashisms/script_location.sh similarity index 100% rename from examples/bashisms/script_location.sh rename to infobase/examples/bashisms/script_location.sh diff --git a/examples/building/vs_var.bat b/infobase/examples/building/vs_var.bat similarity index 100% rename from examples/building/vs_var.bat rename to infobase/examples/building/vs_var.bat diff --git a/examples/cpp_grammar_code/CxxLexer.cpp b/infobase/examples/cpp_grammar_code/CxxLexer.cpp similarity index 100% rename from examples/cpp_grammar_code/CxxLexer.cpp rename to infobase/examples/cpp_grammar_code/CxxLexer.cpp diff --git a/examples/cpp_grammar_code/CxxLexer.l b/infobase/examples/cpp_grammar_code/CxxLexer.l similarity index 100% rename from examples/cpp_grammar_code/CxxLexer.l rename to infobase/examples/cpp_grammar_code/CxxLexer.l diff --git a/examples/cpp_grammar_code/CxxLexing.cxx b/infobase/examples/cpp_grammar_code/CxxLexing.cxx similarity index 100% rename from examples/cpp_grammar_code/CxxLexing.cxx rename to infobase/examples/cpp_grammar_code/CxxLexing.cxx diff --git a/examples/cpp_grammar_code/CxxLexing.hxx b/infobase/examples/cpp_grammar_code/CxxLexing.hxx similarity index 100% rename from examples/cpp_grammar_code/CxxLexing.hxx rename to infobase/examples/cpp_grammar_code/CxxLexing.hxx diff --git a/examples/cpp_grammar_code/CxxParser.cpp b/infobase/examples/cpp_grammar_code/CxxParser.cpp similarity index 100% rename from examples/cpp_grammar_code/CxxParser.cpp rename to infobase/examples/cpp_grammar_code/CxxParser.cpp diff --git a/examples/cpp_grammar_code/CxxParser.y b/infobase/examples/cpp_grammar_code/CxxParser.y similarity index 100% rename from examples/cpp_grammar_code/CxxParser.y rename to infobase/examples/cpp_grammar_code/CxxParser.y diff --git a/examples/cpp_grammar_code/CxxParsing.cxx b/infobase/examples/cpp_grammar_code/CxxParsing.cxx similarity index 100% rename from examples/cpp_grammar_code/CxxParsing.cxx rename to infobase/examples/cpp_grammar_code/CxxParsing.cxx diff --git a/examples/cpp_grammar_code/CxxParsing.hxx b/infobase/examples/cpp_grammar_code/CxxParsing.hxx similarity index 100% rename from examples/cpp_grammar_code/CxxParsing.hxx rename to infobase/examples/cpp_grammar_code/CxxParsing.hxx diff --git a/examples/cpp_grammar_code/CxxToken.cpp b/infobase/examples/cpp_grammar_code/CxxToken.cpp similarity index 100% rename from examples/cpp_grammar_code/CxxToken.cpp rename to infobase/examples/cpp_grammar_code/CxxToken.cpp diff --git a/examples/cpp_grammar_code/CxxToken.cxx b/infobase/examples/cpp_grammar_code/CxxToken.cxx similarity index 100% rename from examples/cpp_grammar_code/CxxToken.cxx rename to infobase/examples/cpp_grammar_code/CxxToken.cxx diff --git a/examples/cpp_grammar_code/CxxToken.hxx b/infobase/examples/cpp_grammar_code/CxxToken.hxx similarity index 100% rename from examples/cpp_grammar_code/CxxToken.hxx rename to infobase/examples/cpp_grammar_code/CxxToken.hxx diff --git a/examples/cpp_grammar_code/README b/infobase/examples/cpp_grammar_code/README similarity index 100% rename from examples/cpp_grammar_code/README rename to infobase/examples/cpp_grammar_code/README diff --git a/examples/cpp_grammar_code/index.html b/infobase/examples/cpp_grammar_code/index.html similarity index 100% rename from examples/cpp_grammar_code/index.html rename to infobase/examples/cpp_grammar_code/index.html diff --git a/examples/cpp_grammar_code/makefile b/infobase/examples/cpp_grammar_code/makefile similarity index 100% rename from examples/cpp_grammar_code/makefile rename to infobase/examples/cpp_grammar_code/makefile diff --git a/examples/cpp_grammar_code/makefile.gmake b/infobase/examples/cpp_grammar_code/makefile.gmake similarity index 100% rename from examples/cpp_grammar_code/makefile.gmake rename to infobase/examples/cpp_grammar_code/makefile.gmake diff --git a/examples/cpp_grammar_code/makefile.macros b/infobase/examples/cpp_grammar_code/makefile.macros similarity index 100% rename from examples/cpp_grammar_code/makefile.macros rename to infobase/examples/cpp_grammar_code/makefile.macros diff --git a/examples/cpp_grammar_code/makefile.unix b/infobase/examples/cpp_grammar_code/makefile.unix similarity index 100% rename from examples/cpp_grammar_code/makefile.unix rename to infobase/examples/cpp_grammar_code/makefile.unix diff --git a/examples/cpp_grammar_code/willink_note_re_grammar.txt b/infobase/examples/cpp_grammar_code/willink_note_re_grammar.txt similarity index 100% rename from examples/cpp_grammar_code/willink_note_re_grammar.txt rename to infobase/examples/cpp_grammar_code/willink_note_re_grammar.txt diff --git a/examples/graphics/pdf_picture_extractor.sh b/infobase/examples/graphics/pdf_picture_extractor.sh similarity index 100% rename from examples/graphics/pdf_picture_extractor.sh rename to infobase/examples/graphics/pdf_picture_extractor.sh diff --git a/examples/legacy/gpg-daemon-launcher.sh b/infobase/examples/legacy/gpg-daemon-launcher.sh similarity index 100% rename from examples/legacy/gpg-daemon-launcher.sh rename to infobase/examples/legacy/gpg-daemon-launcher.sh diff --git a/examples/legacy/template.pl b/infobase/examples/legacy/template.pl similarity index 100% rename from examples/legacy/template.pl rename to infobase/examples/legacy/template.pl diff --git a/examples/os_related/OS_crusher.bat b/infobase/examples/os_related/OS_crusher.bat similarity index 100% rename from examples/os_related/OS_crusher.bat rename to infobase/examples/os_related/OS_crusher.bat diff --git a/examples/os_related/OS_crusher.sh b/infobase/examples/os_related/OS_crusher.sh similarity index 100% rename from examples/os_related/OS_crusher.sh rename to infobase/examples/os_related/OS_crusher.sh diff --git a/examples/os_related/block_ip_address.sh b/infobase/examples/os_related/block_ip_address.sh similarity index 100% rename from examples/os_related/block_ip_address.sh rename to infobase/examples/os_related/block_ip_address.sh diff --git a/examples/os_related/example_registry_ops.sh b/infobase/examples/os_related/example_registry_ops.sh similarity index 100% rename from examples/os_related/example_registry_ops.sh rename to infobase/examples/os_related/example_registry_ops.sh diff --git a/examples/os_related/set_tcp_config.sh b/infobase/examples/os_related/set_tcp_config.sh similarity index 100% rename from examples/os_related/set_tcp_config.sh rename to infobase/examples/os_related/set_tcp_config.sh diff --git a/examples/os_related/user_sudoing.sh b/infobase/examples/os_related/user_sudoing.sh similarity index 100% rename from examples/os_related/user_sudoing.sh rename to infobase/examples/os_related/user_sudoing.sh diff --git a/examples/perlisms/example_perl_array_and_hash.pl b/infobase/examples/perlisms/example_perl_array_and_hash.pl similarity index 100% rename from examples/perlisms/example_perl_array_and_hash.pl rename to infobase/examples/perlisms/example_perl_array_and_hash.pl diff --git a/examples/readme.txt b/infobase/examples/readme.txt similarity index 100% rename from examples/readme.txt rename to infobase/examples/readme.txt diff --git a/examples/ripping_and_burning_examples.txt b/infobase/examples/ripping_and_burning_examples.txt similarity index 100% rename from examples/ripping_and_burning_examples.txt rename to infobase/examples/ripping_and_burning_examples.txt diff --git a/scripts/core/common.alias b/scripts/core/common.alias index af3378bf..44a057be 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -104,7 +104,7 @@ define_yeti_alias feisty_branch='pushd $FEISTY_MEOW_APEX ; git branch ; popd' define_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_web_permissions="sudo bash \"$FEISTY_MEOW_SCRIPTS/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh\"" ############## diff --git a/scripts/core/generate_aliases.pl b/scripts/core/generate_aliases.pl index 99f17cfd..09885b06 100644 --- a/scripts/core/generate_aliases.pl +++ b/scripts/core/generate_aliases.pl @@ -186,6 +186,11 @@ open(she, ">> $FEISTY_MEOW_LOADING_DOCK/fmc_aliases_for_scripts.sh"); @shell_files = (find_files(recursive_find_directories("$FEISTY_MEOW_SCRIPTS")), find_files(recursive_find_directories("$FEISTY_MEOW_LOADING_DOCK/custom/scripts"))); +# strip out the customization files, since they are added in on demand only. +#print "before filtering list: @shell_files\n"; +@shell_files = grep ! /\/customize\//, @shell_files; +#print "after filtering list: @shell_files\n"; + #printf "found all these files in main script dirs:\n"; #printf " @shell_files\n"; diff --git a/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh b/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh old mode 100755 new mode 100644 index f474b2da..29483051 --- a/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh +++ b/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh @@ -1,42 +1,40 @@ +#!/bin/bash # fixes the cakelampvm permissions according to the way. -source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" - ############## -if (( $EUID != 0 )); then +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" + +############## + # make sure we have the appropriate access on a few key folders. normal_perm /var/www ############## # change the owner for the web roots to the apache user, www-data. -sudo chown -R www-data:www-data /var/www +chown -R www-data:www-data /var/www # put a couple specific ownerships into play so the appropriate user has full access. -sudo chown -R developer:developer /home/developer \ - /etc/apache2 \ - /etc/bind \ - - -sudo chown -R fred:fred /home/fred \ - /opt/feistymeow.org \ - /home/archives/stuffing \ +chown -R developer:developer /home/developer /opt/feistymeow.org /etc/apache2 /etc/bind +chown -R fred:fred /home/fred /home/archives/stuffing ############## # these directories will be given group permissons that enable web server access. -group_perm /var/www/html \ - /opt/feistymeow.org \ - /etc/apache \ - / +group_perm /var/www /etc/apache2 /etc/bind ############## + diff --git a/scripts/site_avenger/standup.sh b/scripts/site_avenger/standup.sh index 47e1aeec..56684b9c 100644 --- a/scripts/site_avenger/standup.sh +++ b/scripts/site_avenger/standup.sh @@ -47,7 +47,7 @@ elif [ -z "$app_dirname" ]; then print_instructions fi -if (( $EUID != 0 )); then +if [[ $EUID != 0 ]]; then echo "This script must be run as root or sudo." exit 1 fi diff --git a/scripts/system/add_apache_site.sh b/scripts/system/add_apache_site.sh index 6be31c8c..647b87b9 100644 --- a/scripts/system/add_apache_site.sh +++ b/scripts/system/add_apache_site.sh @@ -127,7 +127,7 @@ echo chow path is now $chow_path # main body of script. -if (( $EUID != 0 )); then +if [[ $EUID != 0 ]]; then echo "This script must be run as root or sudo." exit 1 fi diff --git a/scripts/system/add_domain.sh b/scripts/system/add_domain.sh index e0a6fb48..3c9df992 100644 --- a/scripts/system/add_domain.sh +++ b/scripts/system/add_domain.sh @@ -132,7 +132,7 @@ function restart_bind() # main body of script. -if (( $EUID != 0 )); then +if [[ $EUID != 0 ]]; then echo "This script must be run as root or sudo." exit 1 fi -- 2.34.1