Merge branch 'dev' of feistymeow.org:feisty_meow into dev
authorChris Koeritz <fred@gruntose.com>
Tue, 14 Nov 2017 14:40:14 +0000 (14:40 +0000)
committerChris Koeritz <fred@gruntose.com>
Tue, 14 Nov 2017 14:40:14 +0000 (14:40 +0000)
27 files changed:
infobase/feisty_inits/dot.bashrc-root
infobase/fortunes.dat
production/feisty_meow_config.ini
production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html [new file with mode: 0644]
production/sites/cakelampvm.com/docs/manual/images/host_only_adapter_dhcp_server.png [new file with mode: 0644]
production/sites/cakelampvm.com/docs/manual/images/host_only_network_adapter.png [new file with mode: 0644]
production/sites/cakelampvm.com/docs/manual/images/nat_network_config.png [new file with mode: 0644]
production/sites/cakelampvm.com/images/green-check-mark-in-circle-hi.png [new file with mode: 0644]
production/sites/cakelampvm.com/images/green_globe_exclamation_point_570.jpg [new file with mode: 0644]
production/sites/cakelampvm.com/images/red_exclamation_mark_icon_256.png [new file with mode: 0644]
production/sites/cakelampvm.com/images/red_x_1194985626525719339tasto_11_architetto_fran_01.svg.med.png [new file with mode: 0644]
production/sites/cakelampvm.com/index.html [new file with mode: 0644]
production/sites/cakelampvm.com/vm_index.html [new file with mode: 0644]
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 4b508630323329b784086d78e521b67815242972..1f462d80b874fe56a077245b02073bdd8f2508a6 100644 (file)
@@ -43018,3 +43018,11 @@ elements into enlightenment by means of that connection.   
 ~
 Never admit defeat.  Just move the front.
   -- fred t. hamster
+~
+down came eddy from his heady,
+where he dwells often unsteady,
+you see he gets so high,
+mind expanded to sky;
+real world grokking just not ready.
+  -- fred t. hamster
+
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.
diff --git a/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html b/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html
new file mode 100644 (file)
index 0000000..610b456
--- /dev/null
@@ -0,0 +1,285 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta content="text/html; charset=windows-1252" http-equiv="content-type">
+    <title>Cake LAMP VM Documentation</title>
+  </head>
+  <body>
+    <h1 style="text-align: center;">The cakelampvm VM:<br>
+      Configuration and Usage</h1>
+    <h2 style=" text-align: center;">By Chris Koeritz</h2>
+    <h3 style="   text-align: center;"> Vintage: cakelampvm v002 &nbsp;&nbsp;
+      Updated: 2017-11-10</h3>
+    <h6> </h6>
+    <h2>Basic info for the guest VM</h2>
+    <ul>
+      <li>hostname: cakelampvm.com</li>
+      <li>local IP address: 10.28.42.20</li>
+      <li>services: DNS (bind9), apache2, fluxbox X windowing system, gnome
+        display manager</li>
+      <li>main user: developer (password distributed separately)</li>
+      <li>mysql root password: (password distributed separately)</li>
+    </ul>
+    <h2>How to set up virtualbox for your host PC</h2>
+    <ol>
+      <li>Download and install virtualbox:
+        https://www.virtualbox.org/wiki/Downloads</li>
+      <li>Install the extension pack for virtualbox: This provides USB drivers
+        and other features.&nbsp; This is installed on virtualbox itself, not on
+        the guests.</li>
+      <ol>
+        <li>Download the extension pack at
+          https://www.virtualbox.org/wiki/Downloads</li>
+        <li>Stop any running virtualbox vms.</li>
+        <li>Close virtualbox control panel.</li>
+        <li>Double-click on the downloaded extensions package (in a file
+          explorer) and virtualbox should install it.</li>
+      </ol>
+      <li>Run the virtualbox control panel.</li>
+      <li>Download the cakelampvm guest vm package and unzip it.&nbsp; Store the
+        unzipped version in some appropriate place where you want the virtual
+        machine to reside on your host's hard drive.</li>
+      <li>Add the guest VM to your list of VMs.&nbsp; From the virtualbox menus,
+        choose the "Machine" menu and select "Add".&nbsp; Point the selector
+        dialog at the cakelampvm folder you created above and open the
+        cakelampvm.vbox file.</li>
+      <li>Now the cakelampvm should show up in the list of virtual
+        machines.&nbsp; Before starting it, perform the following network
+        configuration sections.</li>
+    </ol>
+    <h3>Configure the Host-Only network on virtualbox</h3>
+    <p>Configuring host-only networking for the VM makes the VM completely local
+      to your machine.&nbsp; The cakelampvm will not be accessible on the
+      internet or from the LAN, and can only be accessed by your host PC.</p>
+    <ol>
+      <li> Go to virtual box "Preferences" (global preferences, not for a
+        specific vm).</li>
+      <li> Click on the "Network" tab.</li>
+      <li> Choose the "Host-only Networks" tab from within "Network".</li>
+      <li> Click the plus icon to add a new host-only network.</li>
+      <li>Set the "Adapter" parameters:<br>
+        IPv4 Address: 10.28.42.1<br>
+        IPv4 Network Mask: 255.255.255.0<br>
+        IPv6 Address: (leave blank)<br>
+        IPv6 Prefix Length: 0<br>
+        Virtualbox will fill in the other details like so:<br>
+        <p><img alt="host only network adapter" src="images/host_only_network_adapter.png"></p>
+      </li>
+      <li>Set the "DHCP Server Settings" to disabled, e.g.<br>
+        <img alt="host only dhcp" src="images/host_only_adapter_dhcp_server.png"><br>
+        This is disabled because we will be using statically assigned addresses
+        for convenience and stability.</li>
+    </ol>
+    <p>Additional information on host-only (and other) network adapter types is
+      at: https://www.virtualbox.org/manual/ch06.html#network_nat_service<br>
+    </p>
+    <h3>Configure the Nat Network on virtualbox</h3>
+    <ol>
+      <li> Go to virtual box "Preferences" (global preferences, not for a
+        specific vm).</li>
+      <li> Click on the "Network" tab.</li>
+      <li> Choose the "Nat Networks" tab from within "Network".</li>
+      <li> Click the plus icon to add a new host-only network.</li>
+      <li>Set the "NAT Network Details" parameters:<br>
+        Network Name: NatNetwork<br>
+        Network CIDR: 10.0.2.0/24<br>
+        Supports DHCP: checked<br>
+        Supports IPv6: optionally checked<br>
+        These are my settings, with IPv6 left disabled:<br>
+        <img alt="nat net config" src="images/nat_network_config.png"></li>
+    </ol>
+    <h2>Using the guest VM's DNS services</h2>
+    <p>The cakelampvm has been set up to provide a DNS server which will answer
+      name requests for all of the sites that the VM hosts.</p>
+    <p>To use the cakelampvm DNS, modify your host operating system network
+      configuration by adding or changing the DNS server to use the guest VM's
+      DNS service.&nbsp; This is available at the local address
+      10.28.42.20.&nbsp; The DNS server can be tested with nslookup, dig and
+      other tools.</p>
+    <p>Note that the cakelampvm DNS should be listed first, if one intends to
+      override any DNS names that actually exist out on the internet.</p>
+    <p>If the DNS server is properly set up, then these ping commands should get
+      answering responses:</p>
+    <pre>ping cakelampvm.com</pre>
+    <pre>ping defaultcake.cakelampvm.com</pre>
+    <pre>ping mapsdemo.cakelampvm.com</pre>
+    <h2>Editing files on the guest VM from the host</h2>
+    <p>On the host computer, look for the guest vm as a networked computer
+      called cakelampvm.&nbsp; This should provide some network shares using
+      Microsoft SMB protocol, and they can be attached to using the "developer"
+      user and its password.</p>
+    <p>On windows, one may want to mount this network location as a drive letter
+      for easier access.</p>
+    <p>Currently, the root of all web servers is exposed as "www".&nbsp; Editing
+      the files in those folders requires ownership by the developer user.&nbsp;
+      Currently the defaultcake server is owned by developer.</p>
+    <p>One should be able to create a new directory in the www folder owned by
+      the developer user over the network also, which can be used for creating
+      new projects.&nbsp; However, there is a config issue in the current vm
+      (v001) about this; to fix, run this command on the guest vm as the
+      developer user:</p>
+    <pre>sudo chmod g+w /var/www</pre>
+    <p>Afterwards, the www folder should allow the developer user to create new
+      folders at will.</p>
+    <h2>Accessing files on the host PC from the guest VM</h2>
+    <p>If you want to share a folder from the host to the guest, perhaps for
+      driver updates or other conveniences, then make the share with these
+      steps:</p>
+    <ol>
+      <li>Create a folder on the host that is to be shared.</li>
+      <li>Right-click on the vm in virtualbox manager and choose "Settings".</li>
+      <li>In the "Shared Folders" tab of the settings, go to "Machine Folders".</li>
+      <li>Click the folder plus icon to create a new share.</li>
+      <li>Fill in the "Folder Path" on the host PC to the folder that will be
+        shared, and give it a name for the guest.&nbsp; We assume the folder
+        name will be "myshare".</li>
+      <li>On the guest vm, run the following commands to mount the share:<br>
+        <pre>mkdir ~/shared&nbsp;&nbsp;&nbsp; # for the guest's version of the shared folder</pre>
+        <pre>sudo mount -t vboxsf myshare ~/shared&nbsp;&nbsp;&nbsp; # mount the vm's share name onto the folder on the vm.</pre>
+      </li>
+    </ol>
+    <h2>Adding a new website and domain on the guest VM</h2>
+    <p>To add a new website, you will need to pick one of the DNS options below
+      (A or B) depending on how you want to name the site.&nbsp; After the DNS
+      is updated, then follow the section after for creating a new apache conf
+      file.</p>
+    <p>Assuming one has created a new folder in "www" called "greatsite", then
+      the new web site can be brought online on the vm with one of the following
+      options.</p>
+    <h3>DNS Option A: Using a sub-domain in the cakelampvm.com domain</h3>
+    Connect to the cakelampvm via ssh as the developer user, e.g.: ssh
+    developer@cakelampvm.com
+    <p>Execute the following command to edit the DNS file for the cakelampvm
+      domain:</p>
+    <pre>sudo vi /etc/bind/cakelampvm.com.conf</pre>
+    <p>Add a stanza for the new site at the end of this file:</p>
+    <pre>greatsite.cakelampvm.com&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp; 10.28.42.20<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; IN HINFO "linux server" "ubuntu"</pre>
+    <p>Restart the DNS server: sudo service bind9 restart</p>
+    <p>Afterwards, pinging greatsite.cakelampvm.com should work from either the
+      guest or the host.</p>
+    <h3>DNS Option B: Using an entirely new domain for the site</h3>
+    <p>Similar procedure to above, but we will create a new file for the new
+      domain and add it to the bind directory.&nbsp; For this example, we will
+      create a file called /etc/bind/greatsite.tv.conf for our new domain
+      greatsite.tv with these contents:</p>
+    <pre>$TTL 1W<br>@&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN SOA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fred.cakelampvm.com. (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2017100801&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; serial<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2H&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; refresh<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; retry<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; expiry<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6H )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; minimum<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ns.cakelampvm.com.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN MX&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mail.cakelampvm.com.<br><br># main domain for machine.<br>greatsite.tv.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.28.42.20<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN HINFO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "linux server" "ubuntu"</pre>
+    The gnarly prefix stuff above the "greatsite.tv." listing establishes
+    configuration info for the new domain.&nbsp; This file relies on the
+    existing cakelampvm.com infrastructure in DNS, such as the "ns" host, which
+    is the domain's name server.
+    <p>Now that the config file is in place, edit "named.conf.local" to add the
+      new file by adding this bit of configuration at the end:</p>
+    <pre>zone "greatsite.tv" in {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file "/etc/bind/greatsite.tv.conf";<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type master;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allow-query { any; };<br>};</pre>
+    <p>Restart the DNS server: sudo service bind9 restart</p>
+    <p>Afterwards, pinging greatsite.tv should work from either the guest or the
+      host.</p>
+    <h3>Create a new apache configuration file and load it</h3>
+    <p>Start with the following template file for the new website, and modify it
+      for the appropriate host name:</p>
+    <pre>&lt;VirtualHost *:80&gt;<br>&nbsp;&nbsp;&nbsp; ServerName greatsite.cakelampvm.com<br>&nbsp;&nbsp;&nbsp; ServerAlias greatsite.cakelampvm.com *.greatsite.cakelampvm.com<br>&nbsp;&nbsp;&nbsp; DocumentRoot /var/www/greatsite<br>&nbsp;&nbsp;&nbsp; ErrorLog ${APACHE_LOG_DIR}/greatsite.cakelampvm.com-error.log<br>&nbsp;&nbsp;&nbsp; CustomLog ${APACHE_LOG_DIR}/greatsite.cakelampvm.com-access.log combined<br>&nbsp;&nbsp;&nbsp; Alias /statistics "/var/www/webwork.repository/webwork/maps_demo/webroot/statistics"<br>&nbsp;&nbsp;&nbsp; Include /etc/apache2/conf-library/basic-options.conf<br>&nbsp;&nbsp;&nbsp; Include /etc/apache2/conf-library/rewrite-enabling.conf<br>&lt;/VirtualHost&gt;</pre>
+    <p>The above example is pre-modified for DNS Option A above, the
+      greatsite.cakelampvm.com name.&nbsp; Switching all of those to
+      "greatsite.tv" instead would support DNS option B.</p>
+    <p>Copy that file into /etc/apache/available-sites under an appropriate
+      name, which here we will call "greatsite.conf".</p>
+    <p>Tell apache to use the new file:</p>
+    <pre>a2ensite greatsite.conf</pre>
+    <p>Finally, restart apache to get it to begin serving the site:</p>
+    <pre>sudo service apache2 restart</pre>
+    <h3>Test the new web site</h3>
+    <p>Given the configuration above, your host PC should now be able to access
+      the new website.</p>
+    <p>To test this, first try pinging the hostname, e.g.: ping
+      greatsite.cakelampvm.com or ping greatsite.tv</p>
+    <p>Then, if there are responses to the ping, it means the DNS is
+      working.&nbsp; If there are no responses, check the instructions in the
+      above DNS option section.</p>
+    <p>Once the DNS is working, one can try browsing to the site at:
+      http://greatsite.cakelampvm.com or http://greatsite.tv (depending on the
+      DNS option chosen).</p>
+    <p>If the site is not showing up properly, try examining the apache logs for
+      error messages that can be corrected.&nbsp; The log files are stored in
+      /var/log/apache2 and are generally named after the website.</p>
+    <h2>Configuring the guest VM</h2>
+    <p>The guest VM should already be set up appropriately.&nbsp; These steps
+      are provided for reference and updates.</p>
+    <h3>Set up virtualbox guest additions for the VM</h3>
+    <p>** note for v001 of cakelampvm: the below steps are still needed on the
+      shipped image.</p>
+    <p>This procedure is needed if the guest provides an older or incompatible
+      version of the guest additions (which have already been installed on the
+      guest vm).&nbsp; It may also be necessary when a new version of the guest
+      additions becomes available.</p>
+    <ol>
+      <li>To install the guest additions, open the guest VM and have its window
+        in focus.</li>
+      <li>Choose the "Devices" menu and select "Insert Guest Additions CD
+        Image".&nbsp; This will mount the CD's ISO image on the VM.</li>
+      <li>On the guest VM, it may be necessary to mount the CD image that's now
+        available:<br>
+        sudo mount /dev/sr0 /media/cdrom</li>
+      <li>Since the VM currently has no windowing system installed, one must
+        start the Guest Additions install manually:<br>
+        cd /media/cdrom<br>
+        sudo sh VBoxLinuxAdditions.run</li>
+      <li>This should install the guest additions.</li>
+    </ol>
+    <h3>Set up network adapters on guest VM</h3>
+    <p>The network interfaces should already be configured on the guest within
+      the virtualbox configuration.&nbsp; This is available by clicking on the
+      VM in the virtualbox manager and selecting "Settings".&nbsp; These are the
+      configuration settings used:</p>
+    Adapter 1:<br>
+    &nbsp; Attached to: Host-only Adapter<br>
+    &nbsp; Name: vboxnet0&nbsp; <br>
+    <p>Adapter 2:<br>
+      &nbsp; Attached to: Nat Network<br>
+      &nbsp; Name: NatNetwork</p>
+    <p>On the guest VM itself, the network settings are specified in a file
+      called /etc/network/interfaces.&nbsp; Here are the current contents of
+      that file:</p>
+    <pre>source /etc/network/interfaces.d/*<br><br>auto lo<br>iface lo inet loopback<br><br>auto enp0s3<br>iface enp0s3 inet static<br>&nbsp; address 10.28.42.20<br>&nbsp; netmask 255.255.255.0<br>&nbsp; network 10.28.42.0<br>&nbsp; broadcast 10.28.42.255<br>&nbsp; dns-domain cakelampvm.com<br>&nbsp; dns-search cakelampvm.com<br>&nbsp; dns-nameservers 127.0.0.1 8.8.8.8</pre>
+    <pre>auto enp0s8</pre>
+    <pre>iface enp0s8 inet dhcp</pre>
+    <p> </p>
+    <h2>Handy Techniques</h2>
+    <h3>Get the network address on the guest vm</h3>
+    <p>Run this command: ifconfig</p>
+    <p>In the results, look for "inet addr".&nbsp; There may be more than one,
+      if there are multiple network interfaces.</p>
+    <h3>How to cleanly reboot or shut down the guest VM</h3>
+    <p>When you've got the DNS and everything integrated, these commands will
+      manage the vm's state:</p>
+    <p>First, log into the guest VM: ssh developer@cakelampvm.com</p>
+    <p>Then, reboot the guest VM: sudo reboot</p>
+    <p>Or, halt the guest VM: sudo shutdown -h now</p>
+    <p>Using these commands is better than just cycling the power from the
+      virtualbox control panel.</p>
+    <h2>Notes on building the Cake Lamp VM</h2>
+    <p>This is all work that should already have been done.&nbsp; It is
+      mentioned here just as breadcrumbs for a future vm builder.</p>
+    <ul>
+      <li>Downloaded and installed virtualbox for host computer (where the vm
+        image will be built).</li>
+      <li>Downloaded ubuntu server 16.04 iso.
+        (https://www.ubuntu.com/download/server)</li>
+      <li>Created a new vm in virtualbox, telling it to start from the ubuntu
+        server iso.</li>
+      <li>Installed LAMP stack on guest VM.&nbsp; Some help here:
+        http://howtoubuntu.org/how-to-install-lamp-on-ubuntu</li>
+      <li>Configured CAKE on the guest VM.&nbsp; Useful link:
+        https://askubuntu.com/questions/628938/how-to-install-cakephp-in-ubuntu-14-04</li>
+      <li>Configured the two network adapters as needed (one for host-only
+        network and one for nat network).&nbsp; Here's some info about
+        virtualbox networking with two adapters similar to our setup:
+https://askubuntu.com/questions/293816/in-virtualbox-how-do-i-set-up-host-only-virtual-machines-that-can-access-the-in<br>
+      </li>
+      <li>Installed and configured Samba service for the guest VM.&nbsp; The
+        main config file lives in "/etc/samba/smb.conf".&nbsp; Some pointers
+        here:
+https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20%28Command-line%20interface/Linux%20Terminal%29%20-%20Uncomplicated%2C%20Simple%20and%20Brief%20Way%21</li>
+    </ul>
+    <p><br>
+    </p>
+  </body>
+</html>
diff --git a/production/sites/cakelampvm.com/docs/manual/images/host_only_adapter_dhcp_server.png b/production/sites/cakelampvm.com/docs/manual/images/host_only_adapter_dhcp_server.png
new file mode 100644 (file)
index 0000000..53db956
Binary files /dev/null and b/production/sites/cakelampvm.com/docs/manual/images/host_only_adapter_dhcp_server.png differ
diff --git a/production/sites/cakelampvm.com/docs/manual/images/host_only_network_adapter.png b/production/sites/cakelampvm.com/docs/manual/images/host_only_network_adapter.png
new file mode 100644 (file)
index 0000000..dd87e5f
Binary files /dev/null and b/production/sites/cakelampvm.com/docs/manual/images/host_only_network_adapter.png differ
diff --git a/production/sites/cakelampvm.com/docs/manual/images/nat_network_config.png b/production/sites/cakelampvm.com/docs/manual/images/nat_network_config.png
new file mode 100644 (file)
index 0000000..3299a3b
Binary files /dev/null and b/production/sites/cakelampvm.com/docs/manual/images/nat_network_config.png differ
diff --git a/production/sites/cakelampvm.com/images/green-check-mark-in-circle-hi.png b/production/sites/cakelampvm.com/images/green-check-mark-in-circle-hi.png
new file mode 100644 (file)
index 0000000..ab1d67b
Binary files /dev/null and b/production/sites/cakelampvm.com/images/green-check-mark-in-circle-hi.png differ
diff --git a/production/sites/cakelampvm.com/images/green_globe_exclamation_point_570.jpg b/production/sites/cakelampvm.com/images/green_globe_exclamation_point_570.jpg
new file mode 100644 (file)
index 0000000..8cb9aa7
Binary files /dev/null and b/production/sites/cakelampvm.com/images/green_globe_exclamation_point_570.jpg differ
diff --git a/production/sites/cakelampvm.com/images/red_exclamation_mark_icon_256.png b/production/sites/cakelampvm.com/images/red_exclamation_mark_icon_256.png
new file mode 100644 (file)
index 0000000..bae1cf6
Binary files /dev/null and b/production/sites/cakelampvm.com/images/red_exclamation_mark_icon_256.png differ
diff --git a/production/sites/cakelampvm.com/images/red_x_1194985626525719339tasto_11_architetto_fran_01.svg.med.png b/production/sites/cakelampvm.com/images/red_x_1194985626525719339tasto_11_architetto_fran_01.svg.med.png
new file mode 100644 (file)
index 0000000..c6d020e
Binary files /dev/null and b/production/sites/cakelampvm.com/images/red_x_1194985626525719339tasto_11_architetto_fran_01.svg.med.png differ
diff --git a/production/sites/cakelampvm.com/index.html b/production/sites/cakelampvm.com/index.html
new file mode 100644 (file)
index 0000000..66fc8d6
--- /dev/null
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta content="text/html; charset=windows-1252" http-equiv="content-type">
+    <title>cakelampvm.com official internet site (NOT the local virtual machine)</title>
+  </head>
+  <body>
+    <div style="text-align: center;"><img alt="uh oh red exclamation" src="images/red_exclamation_mark_icon_256.png" width="140" height="140">
+      <img alt="x marks a bad spot" src="images/red_x_1194985626525719339tasto_11_architetto_fran_01.svg.med.png" width="140" height="140">
+      <img alt="uh oh red exclamation" src="images/red_exclamation_mark_icon_256.png" width="140" height="140"></div>
+    <h1 style=" text-align: center;">cakelampvm.com REAL INTERNET site</h1>
+    <h2 style=" text-align: center;"> </h2>
+    <h2 style=" text-align: center;"> &#9733;&#9733; If you are running the cakelampvm, &#9733;&#9733;<br>
+      &#9733;&#9733; then it is not yet configured properly. &#9733;&#9733; </h2>
+    <h3 style=" text-align: center;">This is the cakelampvm.com domain that is
+      actually <span style="font-weight: bold;">on the internet</span>.</h3>
+    <h4 style=" text-align: center;">Official cakelampvm setup guide: <a
+        target="_blank" href="docs/manual/cakelampvm_guide_v002.html">The
+        cakelampvm.com VM: Configuration and Usage</a></h4>
+    <div style="text-align: center;"><img alt="uh oh red exclamation" src="images/red_exclamation_mark_icon_256.png" width="140" height="140">
+      <img alt="x marks a bad spot" src="images/red_x_1194985626525719339tasto_11_architetto_fran_01.svg.med.png" width="140" height="140">
+      <img alt="uh oh red exclamation" src="images/red_exclamation_mark_icon_256.png" width="140" height="140">
+</div>
+  </body>
+</html>
diff --git a/production/sites/cakelampvm.com/vm_index.html b/production/sites/cakelampvm.com/vm_index.html
new file mode 100644 (file)
index 0000000..c2b54ea
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta content="text/html; charset=windows-1252" http-equiv="content-type">
+    <title>cakelampvm.com served by your local virtual machine!</title>
+  </head>
+  <body>
+    <div style="text-align: center;"><img alt="yay, green exclaimed" src="images/green_globe_exclamation_point_570.jpg"
+        height="140" width="140"> <img alt="you're in the right place, and dns is being hosted by your local cakelampvm.com virtual machine"
+        src="images/green-check-mark-in-circle-hi.png" height="140" width="140">
+      <img alt="yay, green exclaimed" src="images/green_globe_exclamation_point_570.jpg"
+        height="140" width="140"></div>
+    <h1 style=" text-align: center;">Yes!<br>
+      You're on the cakelampvm.com virtualized site!</h1>
+    <h2 style=" text-align: center;"> </h2>
+    <h2 style=" text-align: center;"> &#9733;&#9733; Your cakelampvm virtual machine seems
+      to be &#9733;&#9733;<br>
+      &#9733;&#9733;&nbsp; successfully overriding this domain (and any&nbsp; &#9733;&#9733;<br>
+      &#9733;&#9733; other sites you have added to host on the vm). &#9733;&#9733; </h2>
+    <h3 style=" text-align: center;">This is the cakelampvm.com domain that is
+      served from your cakelampvm virtual machine<br>
+      <span style="font-style: italic;">(as long as browser URL bar actually
+        says "cakelampvm.com" or "www.cakelampvm.com").</span></h3>
+    <h4 style=" text-align: center;">Official cakelampvm setup guide: <a target="_blank"
+        href="docs/manual/cakelampvm_guide_v002.html">The cakelampvm.com VM:
+        Configuration and Usage</a></h4>
+    <div style="text-align: center;"><img alt="yay, green exclaimed" src="images/green_globe_exclamation_point_570.jpg"
+        height="140" width="140"> <img alt="you're in the right place, and dns is being hosted by your local cakelampvm.com virtual machine"
+        src="images/green-check-mark-in-circle-hi.png" height="140" width="140">
+      <img alt="yay, green exclaimed" src="images/green_globe_exclamation_point_570.jpg"
+        height="140" width="140">
+    </div>
+  </body>
+</html>
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.
+
+
+
+