From: Matt Birkholz Date: Wed, 8 May 2024 20:45:33 +0000 (-0600) Subject: Update README.html. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b5c3726e983d77bfc33364fb064c450bf185cba3;p=Network Update README.html. --- diff --git a/README.html b/README.html index 55e4775..2ec9780 100644 --- a/README.html +++ b/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Birchwood Abbey Networks @@ -64,7 +64,7 @@ map is very similar, with differences mainly in terminology, philosophy, attitude.

-
+
                 |                                                   
                 =                                                   
               _|||_                                                 
@@ -136,8 +136,8 @@ with Apache2, spooling email with Postfix and serving it with
 Dovecot-IMAPd, and hosting a VPN with OpenVPN.
 

-
-

3.1. Install Emacs

+
+

3.1. Install Emacs

The monks of the abbey are masters of the staff (bo) and Emacs. @@ -408,16 +408,9 @@ web site /favicon.ico. apache2_module: name=rewrite notify: Restart Apache2. -- name: Enable Apache2 cgid module for Gitweb (Ubuntu). +- name: Enable Apache2 cgid module. become: yes apache2_module: name=cgid - when: ansible_distribution == 'Ubuntu' - notify: Restart Apache2. - -- name: Enable Apache2 cgi module for Gitweb (Debian). - become: yes - apache2_module: name=cgi - when: ansible_distribution == 'Debian' notify: Restart Apache2. - name: Install libcgi-pm-perl for Gitweb. @@ -710,7 +703,7 @@ certificate is a terminal session affair (with prompts and lines entered as shown below).

-
+
 $ sudo apt install python3-certbot-apache
 $ sudo certbot --apache -d birchwood-abbey.net
 ...
@@ -929,8 +922,8 @@ with Postfix and Dovecot, and providing essential localnet services:
 NTP, DNS and DHCP.
 

-
-

4.1. Include Abbey Variables

+
+

4.1. Include Abbey Variables

In this abbey specific document, most abbey particulars are not @@ -1128,8 +1121,8 @@ The abbey uses the Apt-Cacher:TNG package cache on Core. The

-
-

4.8. Use Cloister Apt Cache

+
+

4.8. Use Cloister Apt Cache

Core itself will benefit from using the package cache. @@ -1786,8 +1779,8 @@ clients: Android, Debian and Campus. The last type never roams, and is not associated with a member of the small institute.

-
-

6.1. Use Cloister Apt Cache

+
+

6.1. Use Cloister Apt Cache

The Apt-Cacher:TNG program does not work well on the frontier, so is @@ -1858,8 +1851,8 @@ Raspberry Pis (architecture aarch64) only.

-
-

6.3. Install Emacs

+
+

6.3. Install Emacs

The monks of the abbey are masters of the staff and Emacs. @@ -1926,7 +1919,7 @@ Listing them (e.g. running owdir /26.nnnnnnnn or owdir below. A test session is shown below.

-
+
 monkey@new$ owdir
 ...
     /26.2153B6000000/
@@ -1965,20 +1958,20 @@ one weather host, anoat.
 # Fetches data from the local owserver once per minute.  Appends to
 # Log/{In,Out}side/YEAR/MONTH/DAY.txt.
 
-use strict;
-use IO::File;
-use Date::Format;
+use strict;
+use IO::File;
+use Date::Format;
 
-my $ILOG;
-my $OLOG;
-my $ymd = "";
+my $ILOG;
+my $OLOG;
+my $ymd = "";
 sub mymkdir ($);
 sub reopen_logs ()
 {
-  my $time = time;
-  my $datime = time2str ("%Y-%m-%d %H:%M:%S", $time, "UTC");
-  my ($year, $month, $day) = $datime =~ /^(\d{4})-(\d\d)-(\d\d) /;
-  my $new_ymd = "$year/$month/$day";
+  my $time = time;
+  my $datime = time2str ("%Y-%m-%d %H:%M:%S", $time, "UTC");
+  my ($year, $month, $day) = $datime =~ /^(\d{4})-(\d\d)-(\d\d) /;
+  my $new_ymd = "$year/$month/$day";
   return if $new_ymd eq $ymd;
   close $ILOG if defined $ILOG;
   close $OLOG if defined $OLOG;
@@ -1986,7 +1979,7 @@ one weather host, anoat.
   mymkdir "Inside/$year/$month";
   mymkdir "Outside/$year/$month";
   umask 027;
-  my $filename = "Inside/$new_ymd.txt";
+  my $filename = "Inside/$new_ymd.txt";
   $ILOG = new IO::File;
   open $ILOG, ">>$filename" or die "Could not open $filename: $!\n";
   $filename = "Outside/$new_ymd.txt";
@@ -1997,13 +1990,13 @@ one weather host, anoat.
 
 sub logit ($$$);
 sub main () {
-  die "usage: $0\n" if @ARGV != 0;
+  die "usage: $0\n" if @ARGV != 0;
   $0 = "weatherd";
   chdir "/home/monkey/Weather/Log" or die;
   umask 027;
-  my $start = time;
+  my $start = time;
   {
-    my $secs = 60 - $start % 60;
+    my $secs = 60 - $start % 60;
     $start += $secs;
     sleep ($secs);
   }
@@ -2014,41 +2007,41 @@ one weather host, anoat.
     logit $ILOG, "T", "/26.8859B6000000/temperature";
     logit $ILOG, "H", "/26.8859B6000000/HIH4000/humidity";
     $start += 60;
-    my $now = time;
+    my $now = time;
     while ($start < $now) { $start += 60; }
-    my $secs = $start - $now;
+    my $secs = $start - $now;
     sleep  ($secs);
   }
 }
 
 sub logit ($$$)
 {
-  my ($log, $name, $query) = @_;
+  my ($log, $name, $query) = @_;
 
-  my $tries = 0;
+  my $tries = 0;
   while ($tries < 3) {
-    my $time = time;
-    my $datime = time2str ("%Y-%m-%d %H:%M:%S", $time, "UTC");
+    my $time = time;
+    my $datime = time2str ("%Y-%m-%d %H:%M:%S", $time, "UTC");
     $tries += 1;
-    my @lines = `/usr/bin/owread $query`;
-    chomp @lines;
-    my $status = $?;
-    my $sig = $status & 127;
+    my @lines = `/usr/bin/owread $query`;
+    chomp @lines;
+    my $status = $?;
+    my $sig = $status & 127;
     $status >>= 8;
     if ($status != 0) {
-      my $L = join "\\n", @lines;
+      my $L = join "\\n", @lines;
       print $log "$datime\t$name\terror: status $status: $L\n";
       $log->flush;
-    } elsif (@lines != 1) {
-      my $L = join "\\n", @lines;
+    } elsif (@lines != 1) {
+      my $L = join "\\n", @lines;
       print $log "$datime\t$name\terror: multiple lines: $L\n";
       $log->flush;
     } elsif ($lines[0] !~ /^ *(-?\d+(\.\d+)?)$/) {
-      my $L = $lines[0];
+      my $L = $lines[0];
       print $log "$datime\t$name\terror: bogus line: $L\n";
       $log->flush;
     } else {
-      my $datum = $1;
+      my $datum = $1;
       print $log "$datime\t$name\t$datum\n";
       $log->flush;
       return;
@@ -2058,19 +2051,19 @@ one weather host, anoat.
 
 sub mymkdir ($)
 {
-  my ($dirpath) = @_;
+  my ($dirpath) = @_;
 
-  my @path_names = split /\//, $dirpath;
-  my $path;
+  my @path_names = split /\//, $dirpath;
+  my $path;
   if (!$path_names[0]) {
     $path = "/";
-    shift @path_names;
+    shift @path_names;
   } else {
     $path = ".";
   }
-  my @created;
-  while (@path_names) {
-    $path .= "/" . shift @path_names;
+  my @created;
+  while (@path_names) {
+    $path .= "/" . shift @path_names;
     if (! -d $path) {
       if (-e $path) {
         die "mkdir $dirpath: already exists; not a directory!\n";
@@ -2079,11 +2072,11 @@ one weather host, anoat.
         die "mkdir $path: $!\n";
       } else {
         chmod 02775, $path;
-        push @created, $path;
+        push @created, $path;
       }
     }
   }
-  return @created;
+  return @created;
 }
 
 main;
@@ -2108,7 +2101,7 @@ installed by the following task.
 

7.4. Install 1-Wire Server

-The following task installs the 1-Wire server and shell commands. The +This next task installs the 1-Wire server and shell commands. The abbey uses the Dallas Semiconductor DS9490R, a USB to 1-Wire adapter, on all its weather hosts, so it also configures the server to use the USB adapter (rather than a test "fake" adapter). @@ -2161,7 +2154,7 @@ The weather daemon is run by an unprivileged monkey account (not executed during the initial phase of configuration, allowing the administrator to login on the new weather host as monkey and thus to test access to the 1-Wire adapter and devices. To facilitate -debugging the sysadm account is included in the monkey group. +debugging, the sysadm account is included in the monkey group.

@@ -2362,8 +2355,8 @@ described in the final section, Configure Cameras, bel

-
-

8.4. Include Abbey Variables

+
+

8.4. Include Abbey Variables

Private variables in private/vars-abbey.yml are needed, and included @@ -2410,7 +2403,7 @@ and "Time Zone" in /usr/share/doc/zoneminder/README.Debian.gz. become: yes apache2_module: name: "{{ item }}" - loop: [ cgi, rewrite, expires, headers ] + loop: [ cgid, rewrite, expires, headers ] notify: Restart Apache2. - name: Enable Zoneminder Apache configuration. @@ -2436,8 +2429,8 @@ and "Time Zone" in /usr/share/doc/zoneminder/README.Debian.gz. line: date.timezone = {{ lookup('file', '/etc/timezone') }} path: "{{ item }}" loop: - - /etc/php/7.4/cli/php.ini - - /etc/php/7.4/apache2/php.ini + - /etc/php/8.2/cli/php.ini + - /etc/php/8.2/apache2/php.ini notify: Restart Apache2. - name: Enable/Start Apache2. @@ -2789,8 +2782,8 @@ machine simply by adding it to the tvrs group.

-
-

9.3. Include Abbey Variables

+
+

9.3. Include Abbey Variables

Private variables in private/vars-abbey.yml are needed, as in the @@ -3134,8 +3127,8 @@ bitter complaints. line: date.timezone = {{ lookup('file', '/etc/timezone') }} path: "{{ item }}" loop: - - /etc/php/7.4/cli/php.ini - - /etc/php/7.4/apache2/php.ini + - /etc/php/8.2/cli/php.ini + - /etc/php/8.2/apache2/php.ini when: mythtv.stat.exists notify: Restart Apache2.

@@ -3336,7 +3329,7 @@ the list of "inputs" available in a postal code typically ends with the OTA (over the air) broadcasts.

-
+
 $ tv_grab_zz_sdjson --configure --config-file .mythtv/Mr.Antenna.xml
 Cache file for lineups, schedules and programs.
 Cache file: [/home/mythtv/.xmltv/tv_grab_zz_sdjson.cache]
@@ -3880,10 +3873,10 @@ The script begins with the following prefix and trampolines.
 #
 # DO NOT EDIT.  This file was tangled from README.org.
 
-use strict;
+use strict;
 
 if (grep { $_ eq $ARGV[0] } qw(CA config new old pass client)) {
-  exec "./Institute/inst", @ARGV;
+  exec "./Institute/inst", @ARGV;
 }
 
@@ -3935,19 +3928,19 @@ a limit pattern. For example: abbey
 if ($ARGV[0] eq "upgrade") {
   shift;
-  my @args = ( "-e", "\@Secret/become.yml" );
+  my @args = ( "-e", "\@Secret/become.yml" );
   if (defined $ARGV[0] && $ARGV[0] eq "-n") {
     shift;
-    push @args, "--check", "--diff";
+    push @args, "--check", "--diff";
   }
   if (defined $ARGV[0]) {
-    my $limit = $ARGV[0];
+    my $limit = $ARGV[0];
     shift;
     die "illegal characters: $limit"
       if $limit !~ /^!?[a-z][-a-z0-9,!]+$/;
-    push @args, "-l", $limit;
+    push @args, "-l", $limit;
   }
-  exec ("ansible-playbook", @args, "playbooks/upgrade.yml");
+  exec ("ansible-playbook", @args, "playbooks/upgrade.yml");
 }
 
@@ -4066,8 +4059,8 @@ last host in the previous play.
abbey
if ($ARGV[0] eq "tz") {
-  my $city = `cat /etc/timezone`; chomp $city;
-  my $zone = `date +%Z`; chomp $zone;
+  my $city = `cat /etc/timezone`; chomp $city;
+  my $zone = `date +%Z`; chomp $zone;
   print "Setting timezones to $city.\n";
   exec ("ansible-playbook", "-e", "\@Secret/become.yml",
         "-e", "zone=$zone", "-e", "city=$city",
@@ -4085,7 +4078,6 @@ last host in the previous play.
     command: timedatectl set-timezone {{ city }}
     when: ansible_date_time.tz != zone
     register: new_tz
-  - debug: msg={{ new_tz }}
 
 - hosts: dvrs
   tasks:
@@ -4116,8 +4108,8 @@ last host in the previous play.
       line: date.timezone = {{ city }}
       path: "{{ item }}"
     loop:
-    - /etc/php/7.4/cli/php.ini
-    - /etc/php/7.4/apache2/php.ini
+    - /etc/php/8.2/cli/php.ini
+    - /etc/php/8.2/apache2/php.ini
     notify: Restart Apache2.
   handlers:
   - name: Restart Apache2.
@@ -4133,7 +4125,7 @@ last host in the previous play.
 

11.7. Abbey Command Help

-abbey
my $ops = "config,new,old,pass,client,upgrade,reboots,versions,tz";
+abbey
my $ops = "config,new,old,pass,client,upgrade,reboots,versions,tz";
 die "usage: $0 [$ops]\n";
 
@@ -4847,7 +4839,7 @@ to private/db.campus_vpn.)

Author: Matt Birkholz

-

Created: 2024-05-03 Fri 11:28

+

Created: 2024-05-08 Wed 14:38

Validate