From: Chris Koeritz The cakelampvm project provides a Virtualbox VM that acts as an "internet
in a bottle", serving up your web sites securely and only to your local
host. The virtual machine provides DNS services (gnome
display manager
★ This section requires that the VM is already configured properly for
+ Host-Only and NAT networks. Using the Virtualbox interface, you should now be able to start your
virtual machine. Virtualbox will complain if it detects any
remaining configuration problems in the VM. The Linux boot sequence
@@ -153,15 +154,35 @@
with:
And then provide the password to log in. Once the DNS services are set up (discussed in detail below), you will be
- able to run the much friendlier command:
+
+
+
+ ★ It is very important that the ssh connection is working properly before
+ proceeding to other configuration steps. If ssh is not working, try
+ pinging the host: If the ping is also failing, then please re-check the two network
+ configuration sections above (for Host-Only networking and NAT
+ networking). These are both required for the VM's network to
+ function as designed. Optional: Once the DNS services are set up (discussed in detail below),
+ you will be able to run the much friendlier command: It is important to set up ssh key forwarding to enable your use of git
repositories while logged into the VM. Key forwarding should be
enabled for the VM's two fake host identities: The details of configuring ssh key forwarding vary for each ssh
+ client. For Linux ssh, the ~/.ssh/config file might contain
+ this information: ★ This section requires that the VM is already configured and is
+ accessible via ssh. The cakelampvm v002 is released with the intention that it not need to be
released again. Version 001 was not built with that explicit
intention, which then required the release of Version 002. But we
@@ -169,12 +190,13 @@
There is an update feature built into the VM that is quite easy to
use. The updates are driven by the feisty meow script repository in
conjunction with a local scripted command. To activate the "update
- process" for your VM, run the following commands on the VM:
feisty meow® concerns ltd.
Vintage: cakelampvm v002
- Updated: 2018-1-7 (rev. i)
+ Updated: 2018-2-7 (rev. j)
How to set up virtualbox for your host PC
@@ -134,6 +133,8 @@
Starting up the VM and Connecting to It
+ ssh developer@10.28.42.20
# or perform the equivalent connection with your ssh client.ping 10.28.42.20
+ ssh developer@cakelampvm.com
Key Forwarding to the VM
cakelampvm.com
+
10.28.42.20Host cakelampvm.com 10.28.42.20
+
ForwardAgent yes
Updating cakelampvm to the Latest Model
+ # update to the latest version of feisty meow.
rpuffer $FEISTY_MEOW_APEX; reconfigure_feisty_meow
# enact any configuration changes needed, such as permissions and account setup.
+ process" for your VM, run the following commands on the VM, logged in as
+ the developer user:
# update to the latest version of feisty meow.
rpuffer $FEISTY_MEOW_APEX; regenerate
# enact any configuration changes needed, such as permissions and account setup.
revamp_cakelampvm
These two commands can be run at any time to patch up your VM to the - latest.
+ latest configuration.Recent versions of feisty meow support a new "get_feisty" command, which will behave the same as the first line above. Once you have run the "puffer..." command above for the first time (on @@ -189,7 +211,9 @@ revamp_cakelampvm gone astray, especially for problems with permissions.
Here are some first steps that will make the vm your own:
+★ This section requires that the VM is already configured and is + accessible via ssh.
+Here are some first steps that will make the vm your own.
(The feisty meow codebase is already configured for the developer account on the cakelampvm virtual machine.)
★ This section requires that the VM is already configured and is + accessible via ssh.
The cakelampvm has been set up to provide a DNS server which will answer name lookup requests on any of the sites that the cakelampvm is hosting for you. It will also serve as a general DNS server for any other @@ -397,6 +423,114 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com describes how to set up Cygwin to run X server, which enables X11 forwarding to your local display.
...{insert that info}...
+A Cheat sheet for the Vim editor (there are many of these available): https://vim.rtorr.com/
+A git branching model that seems to work well: http://nvie.com/posts/a-successful-git-branching-model/
+This is a basic guide to the Google Developer Console and API Key + management: Google + API Docs
+Meld is a great comparison tool that displays differences between two + files or directories or directory trees in a graphical view. Meld is + pre-installed on the VM. This tool can be launched either in the + VM's X Windowing System (on the console) or if X11 forwarding is enabled.
+To run meld, just type this command:
+meld A B
+ where A and B are either both file names or they are both directory + names. If A and B are directories, meld will compare the entire tree + structure between the two directories. It allows one to copy from + one side to the other, even if the item that needs to be copied is an + entire subdirectory.
+Run this command:
+ifconfig
+ In the results, look for "inet addr". + There may be more than one, if there are multiple network interfaces.
+The standard IP address is 10.28.42.20 for the cakelampvm.
+When you've got the DNS and everything integrated, these commands will + manage the vm's state:
+First, log into the guest VM:
+ssh developer@cakelampvm.com
+ Then, to reboot the guest VM:
+sudo reboot
+ Or, to halt the guest VM:
+sudo shutdown -h now
+ Using these commands is kinder to the VM than just cycling the power from + the Virtualbox control panel.
+This is the lowest level of plumbing for your VM. Hopefully you + will not need to engage with this section. The most useful doc + section here is the one below about the "Virtualbox guest additions", + which you will probably need at some future point. Oracle releases + updates to the guest additions fairly regularly.
+The guest VM should already be set up appropriately. These steps + are provided for reference and updates.
+sudo mount /dev/sr0 /media/cdrom
+ Linux will mention that the device is mounted "read-only".
+cd /media/cdrom
sudo sh VBoxLinuxAdditions.run
+ The network interfaces should already be configured on the guest within + the Virtualbox configuration. This is available by clicking on the + VM in the Virtualbox manager and selecting "Settings". These are the + configuration settings used:
+ Adapter 1:Adapter 2:
+ Attached to: Nat Network
+ Name: NatNetwork
On the guest VM itself, the network settings are specified in a file + called /etc/network/interfaces. Here are the current contents of + that file:
+source /etc/network/interfaces.d/*+
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet static
address 10.28.42.20
netmask 255.255.255.0
network 10.28.42.0
broadcast 10.28.42.255
dns-domain cakelampvm.com
dns-search cakelampvm.com
dns-nameservers 127.0.0.1 8.8.8.8
auto enp0s8+
iface enp0s8 inet dhcp+
+
To minimize the size used for the disk image, there are three major + steps.
+1. While running the VM, run this command:
+sudo apt clean
+ This throws away any cached data from the apt tool, which can be + substantial.
+If there are other junk files you know of that can be removed, delete + those now also.
+2. Reboot the VM to the gparted ISO image (available at the gparted + site) and run the following command:
+sudo zerofree /dev/sda
+ This sets all free space to the zero byte, enabling Virtualbox to free + that space in the next step.
+3. Shut the vm down after zerofree is complete and run this command on + the host PC (this is the Linux version of the command):
+VBoxManage modifyhd --compact ~/cake_lamp_vm/cake-lamp-vm-hd.vdi
+ Replace the ~/cake_lamp_vm + path with the real VM storage path. This command compacts the root + (and only) partition of the VM.
+After these steps are complete, the VM should be its minimal size.
Note: these instructions, even the quick approaches below, pale in comparison to the ease of use of the "standup" command in feisty meow's @@ -515,114 +649,6 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com for any error messages that can be corrected. The log files are stored in "/var/log/apache2" and are named after the website (if configured through the above process).
-A Cheat sheet for the Vim editor (there are many of these available): https://vim.rtorr.com/
-A git branching model that seems to work well: http://nvie.com/posts/a-successful-git-branching-model/
-This is a basic guide to the Google Developer Console and API Key - management: Google - API Docs
-Meld is a great comparison tool that displays differences between two - files or directories or directory trees in a graphical view. Meld is - pre-installed on the VM. This tool can be launched either in the - VM's X Windowing System (on the console) or if X11 forwarding is enabled.
-To run meld, just type this command:
-meld A B
- where A and B are either both file names or they are both directory - names. If A and B are directories, meld will compare the entire tree - structure between the two directories. It allows one to copy from - one side to the other, even if the item that needs to be copied is an - entire subdirectory.
-Run this command:
-ifconfig
- In the results, look for "inet addr". - There may be more than one, if there are multiple network interfaces.
-The standard IP address is 10.28.42.20 for the cakelampvm.
-When you've got the DNS and everything integrated, these commands will - manage the vm's state:
-First, log into the guest VM:
-ssh developer@cakelampvm.com
- Then, to reboot the guest VM:
-sudo reboot
- Or, to halt the guest VM:
-sudo shutdown -h now
- Using these commands is kinder to the VM than just cycling the power from - the Virtualbox control panel.
-This is the lowest level of plumbing for your VM. Hopefully you - will not need to engage with this section. The most useful doc - section here is the one below about the "Virtualbox guest additions", - which you will probably need at some future point. Oracle releases - updates to the guest additions fairly regularly.
-The guest VM should already be set up appropriately. These steps - are provided for reference and updates.
-sudo mount /dev/sr0 /media/cdrom
- Linux will mention that the device is mounted "read-only".
-cd /media/cdrom
sudo sh VBoxLinuxAdditions.run
- The network interfaces should already be configured on the guest within - the Virtualbox configuration. This is available by clicking on the - VM in the Virtualbox manager and selecting "Settings". These are the - configuration settings used:
- Adapter 1:Adapter 2:
- Attached to: Nat Network
- Name: NatNetwork
On the guest VM itself, the network settings are specified in a file - called /etc/network/interfaces. Here are the current contents of - that file:
-source /etc/network/interfaces.d/*-
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet static
address 10.28.42.20
netmask 255.255.255.0
network 10.28.42.0
broadcast 10.28.42.255
dns-domain cakelampvm.com
dns-search cakelampvm.com
dns-nameservers 127.0.0.1 8.8.8.8
auto enp0s8-
iface enp0s8 inet dhcp-
-
To minimize the size used for the disk image, there are three major - steps.
-1. While running the VM, run this command:
-sudo apt clean
- This throws away any cached data from the apt tool, which can be - substantial.
-If there are other junk files you know of that can be removed, delete - those now also.
-2. Reboot the VM to the gparted ISO image (available at the gparted - site) and run the following command:
-sudo zerofree /dev/sda
- This sets all free space to the zero byte, enabling Virtualbox to free - that space in the next step.
-3. Shut the vm down after zerofree is complete and run this command on - the host PC (this is the Linux version of the command):
-VBoxManage modifyhd --compact ~/cake_lamp_vm/cake-lamp-vm-hd.vdi
- Replace the ~/cake_lamp_vm - path with the real VM storage path. This command compacts the root - (and only) partition of the VM.
-After these steps are complete, the VM should be its minimal size.
This is all work that should already have been done. It is mentioned here just as breadcrumbs for a future vm builder.
diff --git a/readme.txt b/readme.txt index aaa8283b..b042ed8c 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,8 @@ Quick Start Guide for the Feisty Meow Codebase -Commands that can be typed in a console or terminal are are prefixed with "#". +Commands that can be typed in a console or terminal are are prefixed with "$". +(Do not include the dollar sign when copying and pasting commands.) Information that varies by platform is prefixed with a '|' character. This documentation assumes that the code is stored in the default location: @@ -19,20 +20,19 @@ How to get the feisty meow codebase | https://feistymeow.org/feisty_meow/documentation/cygwin_install_list.txt (web) Retrieve a clone of the feisty meow codebase: -# git clone git://feistymeow.org/feisty_meow +$ git clone git://feistymeow.org/feisty_meow ============== How to load the feisty meow script environment Set up the feisty_meow scripts; this is only needed once, when you first get -the codebase. It will also regenerate the scripts using the latest installed -version. -# bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh +the codebase. +$ bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh 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 +$ 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 @@ -42,13 +42,13 @@ 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 ~/.bashrc above. -# source /opt/feistymeow.org/feisty_meow/scripts/core/launch_feisty_meow.sh +$ source /opt/feistymeow.org/feisty_meow/scripts/core/launch_feisty_meow.sh When the feisty meow script environment loaded, many new aliases and functions are available for use. These come from the $FEISTY_MEOW_SCRIPTS folder. -See the full list of commands at: -(hmmm: To be completed in 2018) +There is a list of feisty meow script commands available at: +https://feistymeow.org/feisty_meow/documentation/feisty_meow_command_reference.txt ============== @@ -59,13 +59,25 @@ differ utility and the feisty meow customization system). They can be installed with either apt-get or CPAN. Install using apt-get (on Ubuntu or Debian-based OS): -# sudo apt-get install libfile-which-perl libtext-diff-perl +$ sudo apt-get install libfile-which-perl libtext-diff-perl or Install using perl's CPAN: -# sudo cpan install Text::Diff File::Which +$ sudo cpan install Text::Diff File::Which or on Cygwin (MS-Windows), install with apt-cyg: -# apt-cyg install perl-File-Which perl-Text-Diff +$ apt-cyg install perl-File-Which perl-Text-Diff + +============== + +How to update the feisty meow codebase to the latest online version + +This assumes that a somewhat current version of feisty meow is already +installed and the scripts are loaded (see above section for how to load). + +The command below retrieves the latest version of feisty meow codebase +from the online repository and regenerates the scripts. + +$ rpuffer $FEISTY_MEOW_APEX ; regenerate ============== @@ -75,10 +87,10 @@ These dependencies are used for building the applications, tools and tests in the "nucleus", "octopi", "graphiq" and other C++ collections. | Ubuntu / Debian: -| # sudo apt-get install build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev +| $ sudo apt-get install build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev | Centos / Redhat / Fedora: -| # sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel +| $ sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel The "kona" collection depends on Java version 8 or better. @@ -91,7 +103,7 @@ The "kona" collection depends on Java version 8 or better. How to build the feisty meow codebase Run the following command to build the feisty meow libraries and applications. -# produce_feisty_meow +$ produce_feisty_meow After the build is complete, the feisty meow applications can be found in the folder pointed at by the $FEISTY_MEOW_BINARIES environment variable. @@ -101,7 +113,7 @@ the folder pointed at by the $FEISTY_MEOW_BINARIES environment variable. How to clean up the files generated by the build This command cleans out all the generated files: -# whack_build clean +$ whack_build clean ============== diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 9eda7788..ea906108 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -55,7 +55,7 @@ fi # re-use work we did on 'exp' macro for the longer windows command. define_yeti_alias explorer=exp define_yeti_alias fix_ssh_perms='chmod 700 $HOME/.ssh ; chmod 600 $HOME/.ssh/*' -define_yeti_alias get_feisty='rpuffer $FEISTY_MEOW_APEX; reconfigure_feisty_meow' +define_yeti_alias get_feisty='rpuffer $FEISTY_MEOW_APEX; regenerate' define_yeti_alias halt='sudo shutdown -h now' define_yeti_alias i=inventory define_yeti_alias l='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl' @@ -146,8 +146,3 @@ unalias fredme feistyme &>/dev/null ############## -# set the sentinel alias that says this file was handled. -#alias CORE_ALIASES_LOADED=true - -############## - diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index dc01d786..4ace5d80 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -452,6 +452,7 @@ if [ -z "$skip_all" ]; then unalias CORE_ALIASES_LOADED &>/dev/null unset -f function_sentinel # reload feisty meow environment in current shell. + echo "reloading the feisty meow scripts." source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" # run nechung oracle to give user a new fortune. nechung diff --git a/scripts/core/reconfigure_feisty_meow.sh b/scripts/core/reconfigure_feisty_meow.sh index 2224c716..cf1e1b0f 100644 --- a/scripts/core/reconfigure_feisty_meow.sh +++ b/scripts/core/reconfigure_feisty_meow.sh @@ -81,3 +81,4 @@ if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo ============== fi + diff --git a/scripts/customize/fred/scripts/games/fallout_new_vegas_link_fixer.sh b/scripts/customize/fred/scripts/games/fallout_new_vegas_link_fixer.sh new file mode 100644 index 00000000..a9a8ed82 --- /dev/null +++ b/scripts/customize/fred/scripts/games/fallout_new_vegas_link_fixer.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# sets up links to make fallout new vegas work properly under wine. +# some mods will look for paths that are incorrectly case sensitive, and this +# script just sets up all those links that we believe are required. + +source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" + +if [ ! -d Data ]; then + echo ' +This script needs to run from the "Fallout New Vegas" install directory, +which is usually found under "steam/steamapps/common". +' + exit 1 +fi + +function make_local_dir_link() +{ + dir="$1"; shift + name="$1"; shift + new_name="$1"; shift + pushd "$dir" &>/dev/null + if [ -L "$new_name" ]; then + echo "Skipping creation of existing link $dir/$new_name" + popd &>/dev/null + return + fi + if [ ! -d "$name" ]; then + echo "Skipping creation of link $dir/$new_name due to missing directory $dir/$name" + popd &>/dev/null + return + fi + ln -s "$name" "$new_name" + test_or_die "creating link for $dir/$new_name from $dir/$name" + echo "Created link $dir/$new_name from $dir/$name" + popd &>/dev/null +} + +make_local_dir_link Data Sound sound +make_local_dir_link Data Textures textures +make_local_dir_link Data Meshes meshes +make_local_dir_link Data/Meshes Landscape landscape +make_local_dir_link Data/Meshes Weapons weapons +make_local_dir_link Data/Sound Voice voice +make_local_dir_link Data/Textures Landscape landscape +make_local_dir_link Data/Textures Landscape weapons +make_local_dir_link Data/Textures Landscape clutter + diff --git a/scripts/opensim/opensim_utils.sh b/scripts/opensim/opensim_utils.sh index 431c85a6..130e9cdd 100644 --- a/scripts/opensim/opensim_utils.sh +++ b/scripts/opensim/opensim_utils.sh @@ -41,7 +41,8 @@ local boguslog=$HOME/screen_junk_$(date_stringer).log #maybe they unbroke it in 17.10? yes, but it requires NO space now. *&@#*&@# #hmmm: bring back old version but check for ubuntu 17.04 vs 17.10 now. #actually they made it a new parm. arghhh! - screen -L $boguslog -S "$screen_name" -d -m nice -n $NICENESS_LEVEL mono "$app_name" + screen -L -S "$screen_name" -d -m nice -n $NICENESS_LEVEL mono "$app_name" +#$boguslog echo "$(date_stringer ' '): $screen_name started." # only sleep if we are not at the last process that gets started. diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 0c8cec27..b96bcb34 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -411,7 +411,7 @@ function do_careful_git_update() remote_branch_info=$(git ls-remote --heads origin $bran 2>/dev/null) if [ ! -z "$remote_branch_info" ]; then # we are pretty sure the remote branch does exist. - git pull $PULL_ADDITION origin "$bran" | $TO_SPLITTER + git pull --tags $PULL_ADDITION origin "$bran" | $TO_SPLITTER # we may want to choose to do fast forward, to avoid crazy multiple merge histories # without any changes in them. --no-ff promote_pipe_return 0 @@ -425,7 +425,7 @@ function do_careful_git_update() # now pull down any changes in our own origin in the repo, to stay in synch # with any changes from others. - git pull $PULL_ADDITION --all | $TO_SPLITTER + git pull --tags $PULL_ADDITION --all | $TO_SPLITTER #is the above really important when we did this branch already in the loop? #it does an --all, but is that effective or different? should we be doing that in above loop? # --no-ff @@ -467,7 +467,7 @@ function do_update() elif [ -d ".git" ]; then if test_writeable ".git"; then $blatt - git pull $PULL_ADDITION 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER + git pull --tags $PULL_ADDITION 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER #ordinary pulls should be allowed to do fast forward: --no-ff promote_pipe_return 0 test_or_die "git pull of origin" diff --git a/scripts/security/password_functions.sh b/scripts/security/password_functions.sh new file mode 100644 index 00000000..f1e0df13 --- /dev/null +++ b/scripts/security/password_functions.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +# a set of useful functions for managing operations with passwords. +# a set of very simple operations, but the file needs to be protected from +# undesirable access. a good way to do that is to make the file owned by +# root, and for it to have permssions of "600" (full access by owner only), +# and to only try to read the password file when in sudo mode. the first +# two requirements are done automatically by the store_password function. + +# load_password: +# provides a way to read a password out of a file. the filename is the first +# paramater and the variable to fill with the password is the second. +function load_password() +{ + local passfile="$1"; shift + local varname="$1"; shift + if [ -z "$passfile" ]; then + echo 'The load_password function needs a filename to read the password from.' + return 1 + fi + if [ ! -f "$passfile" ]; then + # no file, which is not an error necessarily, but return a blank password + # in any case. + return 0 + fi + local passwd + read passwd < "$passfile" + + # return the password in the variable they provided. + eval $varname="$passwd" +} + +# stores a password into a password file. the password file should be the +# first parameter and the password should be the second. +# this makes sure that only root can read the file. +function store_password() +{ + local passfile="$1"; shift + local passwd="$1"; shift + if [ -z "$passfile" -o -z "$passwd" ]; then + echo ' +The store_password function needs (1) the file to store the password into, +and (2) the password that should be stored. +' + return 1 + fi + + echo "$passwd" > "$passfile" + test_or_die "writing password into the file $passfile" + + chown root:root "$passfile" + test_or_die "chowning the password file to root ownership for: $passfile" + + chmod 600 "$passfile" + test_or_die "restricting permissions on password file for: $passfile" +} + +# reads a password from the console, without echoing the letters when they +# are typed. the prompt to show the user is required as the first parameter, +# and the variable to fill with the result is the second parameter. +function read_password() +{ + local prompt="$1"; shift + local varname="$1"; shift +#hmmm: complain if not enough parms. + echo -n "$prompt " + # turn off echo but remember former setting. + stty_orig=`stty -g` + stty -echo + local the_passwd + read the_passwd + # turn echo back on. + stty $stty_orig + # return the password in the variable they provided. + eval $varname="$the_passwd" +} + + diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index 180574eb..2b021416 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -16,21 +16,22 @@ export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )" export NO_HELLO=right source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh" +# load dependencies for our script. source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" +source "$FEISTY_MEOW_SCRIPTS/security/password_functions.sh" ############## -# new requirement is to get the sql root password, since we need to do some sql db configuration. -echo -n "Please enter the MySQL root account password: " -# turn off echo but remember former setting. -stty_orig=`stty -g` -stty -echo -read mysql_passwd -# turn echo back on. -stty $stty_orig +# it's a requirement to have sql root password, since we may need some sql db configuration. +load_password /etc/mysql/secret_password mysql_passwd +if [ -z "$mysql_passwd" ]; then + read_password "Please enter the MySQL root account password:" mysql_passwd +fi if [ -z "$mysql_passwd" ]; then echo "This script must have the sql root password to proceed." exit 1 +else + store_password /etc/mysql/secret_password "$mysql_passwd" fi ############## @@ -39,8 +40,8 @@ sep echo "Regenerating feisty meow loading dock." -reconfigure_feisty_meow -test_or_die "feisty meow reconfiguration" +regenerate +test_or_die "regenerating feisty meow configuration" chown -R "$(logname)":"$(logname)" /home/$(logname)/.[a-zA-Z0-9]* test_or_die "fix after reconfigured as sudo" @@ -323,17 +324,9 @@ fi sep -# repair the google config key for mapsdemo, which lives over in fred's account. -search_replace \ - "^[[:blank:]]*'key'[[:blank:]]*=>[[:blank:]]*'AIzaSyCd2kfOBf8tyd-_m2aM_ayMoAq8r_M1yUk'," \ - "\t'key' => 'AIzaSyCvKs62XudEWPZpA21rCGI1Dkh6UxSQzzQ'," \ - ~fred/apps/mapsdemo/avenger5/config/config_google.php - -if [ $? -ne 0 ]; then - echo Google config key for mapsdemo in fred account seems to already be patched. -else - echo Patched the google config key for mapsdemo app in fred account. -fi +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/ ############## ############## @@ -352,7 +345,7 @@ echo " Thanks for revamping your cakelampvm. :-) You may want to update your current shell's feisty meow environment by typing: - reconfigure_feisty_meow + regenerate " ##############