Explorar el Código

helper script for site specific deploy files

* id_rsa private key
* diu_ui_site_specific.js admin interface (site specific)
* common_values.sh site specific
* example paddle

These files are test only, with the id_rsa being the 'snake oil'
key.
For site specific deploys, the 'data' directory should be populated
with the above files specific to each client.

ardworker_rcv.ino moved to it's own subdirectory
clementinecomputing hace 5 años
padre
commit
c0cbae67fc

+ 70 - 0
aux/DIU-deploy-site-specific

@@ -0,0 +1,70 @@
+#!/bin/bash
+#
+# Copyright (c) 2020 Clementine Computing LLC.
+#
+# This file is part of PopuFare.
+#
+# PopuFare is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# PopuFare is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
+#
+
+# This script is meant to be run from a USB stick, say, to deploy
+# this site specific files on a DIU.
+#
+# This includes
+#
+# * The private SSH key
+# * The `common_values.sh` file
+# * The `diu_ui_site_specific.js` admin interface file
+# * Any paddles that might need transfer
+#
+# This will look for a local `data` directory with all the appropriate files
+#
+
+BASEDIR="data"
+SSH_FILE=$BASEDIR/id_rsa
+COM_VAL=$BASEDIR/common_values.sh
+DIU_UI=$BASEDIR/diu_ui_site_specific.js
+
+if [[ -e "$SSH_FILE" ]] ; then
+  echo "# deploying SSH file $SSH_FILE to /home/bus/.ssh"
+  cp -L -f "$SSH_FILE" /home/bus/.ssh/id_rsa
+  chmod a-rwx /home/bus/.ssh/id_rsa
+  chmod u+r /home/bus/.ssh/id_rsa
+else
+  echo "# FILE NOT FOUND (SSH id_rsa): $SSH_FILE"
+fi
+
+if [[ -e "$COM_VAL" ]] ; then
+  echo "# deploying common_values.sh file $COM_VAL to /home/bus/config/common_values.sh"
+  cp -L -f "$COM_VAL" /home/bus/config
+else
+  echo "# FILE NOT FOUND (COMMON VALUES): $COM_VAL"
+fi
+
+if [[ -e "$DIU_UI" ]] ; then
+  echo "# deploying diu_site_specific file: $DIU_UI -> /home/bus/config/html/js/diu_site_sepcific.js"
+  cp -L -f "$DIU_UI" /home/bus/config/html/js/diu_site_specific.js
+else
+  echo "# FILE NOT FOUND (DIU SITE SPECIFIC): $DIU_UI"
+fi
+
+for pfn in `find data -name '*.paddle' -type f` ; do
+  bpfn=`basename $pfn`
+  echo "# deploying paddle file: $pfn -> /home/bus/config/$bpfn"
+  cp -L -f "$pfn" /home/bus/config/$bpfn
+done
+
+echo "# done"
+
+

+ 435 - 0
aux/data/6055.paddle

@@ -0,0 +1,435 @@
+# Paddle 6055 (testing)
+# coordinates in concatenated degree/decimal minute format (DMM)
+# hour	minute	latitude	longitude	route	trip	stop	name
+0	1	4226.73072	-7630.4356	1000	1	1	test route top
+0	2	4226.69928	-7630.41112	1000	1	2	test route mid
+0	3	4226.664	-7630.38664	1000	1	3	test route bottom
+0	11	4226.73072	-7630.4356	1010	2	1	test route top
+0	12	4226.69928	-7630.41112	1010	2	2	test route mid
+0	13	4226.664	-7630.38664	1010	2	3	test route bottom
+0	21	4226.73072	-7630.4356	1000	3	1	test route top
+0	22	4226.69928	-7630.41112	1000	3	2	test route mid
+0	23	4226.664	-7630.38664	1000	3	3	test route bottom
+0	31	4226.73072	-7630.4356	1010	4	1	test route top
+0	32	4226.69928	-7630.41112	1010	4	2	test route mid
+0	33	4226.664	-7630.38664	1010	4	3	test route bottom
+0	41	4226.73072	-7630.4356	1000	5	1	test route top
+0	42	4226.69928	-7630.41112	1000	5	2	test route mid
+0	43	4226.664	-7630.38664	1000	5	3	test route bottom
+0	51	4226.73072	-7630.4356	1010	6	1	test route top
+0	52	4226.69928	-7630.41112	1010	6	2	test route mid
+0	53	4226.664	-7630.38664	1010	6	3	test route bottom
+1	1	4226.73072	-7630.4356	1000	1	1	test route top
+1	2	4226.69928	-7630.41112	1000	1	2	test route mid
+1	3	4226.664	-7630.38664	1000	1	3	test route bottom
+1	11	4226.73072	-7630.4356	1010	2	1	test route top
+1	12	4226.69928	-7630.41112	1010	2	2	test route mid
+1	13	4226.664	-7630.38664	1010	2	3	test route bottom
+1	21	4226.73072	-7630.4356	1000	3	1	test route top
+1	22	4226.69928	-7630.41112	1000	3	2	test route mid
+1	23	4226.664	-7630.38664	1000	3	3	test route bottom
+1	31	4226.73072	-7630.4356	1010	4	1	test route top
+1	32	4226.69928	-7630.41112	1010	4	2	test route mid
+1	33	4226.664	-7630.38664	1010	4	3	test route bottom
+1	41	4226.73072	-7630.4356	1000	5	1	test route top
+1	42	4226.69928	-7630.41112	1000	5	2	test route mid
+1	43	4226.664	-7630.38664	1000	5	3	test route bottom
+1	51	4226.73072	-7630.4356	1010	6	1	test route top
+1	52	4226.69928	-7630.41112	1010	6	2	test route mid
+1	53	4226.664	-7630.38664	1010	6	3	test route bottom
+2	1	4226.73072	-7630.4356	1000	1	1	test route top
+2	2	4226.69928	-7630.41112	1000	1	2	test route mid
+2	3	4226.664	-7630.38664	1000	1	3	test route bottom
+2	11	4226.73072	-7630.4356	1010	2	1	test route top
+2	12	4226.69928	-7630.41112	1010	2	2	test route mid
+2	13	4226.664	-7630.38664	1010	2	3	test route bottom
+2	21	4226.73072	-7630.4356	1000	3	1	test route top
+2	22	4226.69928	-7630.41112	1000	3	2	test route mid
+2	23	4226.664	-7630.38664	1000	3	3	test route bottom
+2	31	4226.73072	-7630.4356	1010	4	1	test route top
+2	32	4226.69928	-7630.41112	1010	4	2	test route mid
+2	33	4226.664	-7630.38664	1010	4	3	test route bottom
+2	41	4226.73072	-7630.4356	1000	5	1	test route top
+2	42	4226.69928	-7630.41112	1000	5	2	test route mid
+2	43	4226.664	-7630.38664	1000	5	3	test route bottom
+2	51	4226.73072	-7630.4356	1010	6	1	test route top
+2	52	4226.69928	-7630.41112	1010	6	2	test route mid
+2	53	4226.664	-7630.38664	1010	6	3	test route bottom
+3	1	4226.73072	-7630.4356	1000	1	1	test route top
+3	2	4226.69928	-7630.41112	1000	1	2	test route mid
+3	3	4226.664	-7630.38664	1000	1	3	test route bottom
+3	11	4226.73072	-7630.4356	1010	2	1	test route top
+3	12	4226.69928	-7630.41112	1010	2	2	test route mid
+3	13	4226.664	-7630.38664	1010	2	3	test route bottom
+3	21	4226.73072	-7630.4356	1000	3	1	test route top
+3	22	4226.69928	-7630.41112	1000	3	2	test route mid
+3	23	4226.664	-7630.38664	1000	3	3	test route bottom
+3	31	4226.73072	-7630.4356	1010	4	1	test route top
+3	32	4226.69928	-7630.41112	1010	4	2	test route mid
+3	33	4226.664	-7630.38664	1010	4	3	test route bottom
+3	41	4226.73072	-7630.4356	1000	5	1	test route top
+3	42	4226.69928	-7630.41112	1000	5	2	test route mid
+3	43	4226.664	-7630.38664	1000	5	3	test route bottom
+3	51	4226.73072	-7630.4356	1010	6	1	test route top
+3	52	4226.69928	-7630.41112	1010	6	2	test route mid
+3	53	4226.664	-7630.38664	1010	6	3	test route bottom
+4	1	4226.73072	-7630.4356	1000	1	1	test route top
+4	2	4226.69928	-7630.41112	1000	1	2	test route mid
+4	3	4226.664	-7630.38664	1000	1	3	test route bottom
+4	11	4226.73072	-7630.4356	1010	2	1	test route top
+4	12	4226.69928	-7630.41112	1010	2	2	test route mid
+4	13	4226.664	-7630.38664	1010	2	3	test route bottom
+4	21	4226.73072	-7630.4356	1000	3	1	test route top
+4	22	4226.69928	-7630.41112	1000	3	2	test route mid
+4	23	4226.664	-7630.38664	1000	3	3	test route bottom
+4	31	4226.73072	-7630.4356	1010	4	1	test route top
+4	32	4226.69928	-7630.41112	1010	4	2	test route mid
+4	33	4226.664	-7630.38664	1010	4	3	test route bottom
+4	41	4226.73072	-7630.4356	1000	5	1	test route top
+4	42	4226.69928	-7630.41112	1000	5	2	test route mid
+4	43	4226.664	-7630.38664	1000	5	3	test route bottom
+4	51	4226.73072	-7630.4356	1010	6	1	test route top
+4	52	4226.69928	-7630.41112	1010	6	2	test route mid
+4	53	4226.664	-7630.38664	1010	6	3	test route bottom
+5	1	4226.73072	-7630.4356	1000	1	1	test route top
+5	2	4226.69928	-7630.41112	1000	1	2	test route mid
+5	3	4226.664	-7630.38664	1000	1	3	test route bottom
+5	11	4226.73072	-7630.4356	1010	2	1	test route top
+5	12	4226.69928	-7630.41112	1010	2	2	test route mid
+5	13	4226.664	-7630.38664	1010	2	3	test route bottom
+5	21	4226.73072	-7630.4356	1000	3	1	test route top
+5	22	4226.69928	-7630.41112	1000	3	2	test route mid
+5	23	4226.664	-7630.38664	1000	3	3	test route bottom
+5	31	4226.73072	-7630.4356	1010	4	1	test route top
+5	32	4226.69928	-7630.41112	1010	4	2	test route mid
+5	33	4226.664	-7630.38664	1010	4	3	test route bottom
+5	41	4226.73072	-7630.4356	1000	5	1	test route top
+5	42	4226.69928	-7630.41112	1000	5	2	test route mid
+5	43	4226.664	-7630.38664	1000	5	3	test route bottom
+5	51	4226.73072	-7630.4356	1010	6	1	test route top
+5	52	4226.69928	-7630.41112	1010	6	2	test route mid
+5	53	4226.664	-7630.38664	1010	6	3	test route bottom
+6	1	4226.73072	-7630.4356	1000	1	1	test route top
+6	2	4226.69928	-7630.41112	1000	1	2	test route mid
+6	3	4226.664	-7630.38664	1000	1	3	test route bottom
+6	11	4226.73072	-7630.4356	1010	2	1	test route top
+6	12	4226.69928	-7630.41112	1010	2	2	test route mid
+6	13	4226.664	-7630.38664	1010	2	3	test route bottom
+6	21	4226.73072	-7630.4356	1000	3	1	test route top
+6	22	4226.69928	-7630.41112	1000	3	2	test route mid
+6	23	4226.664	-7630.38664	1000	3	3	test route bottom
+6	31	4226.73072	-7630.4356	1010	4	1	test route top
+6	32	4226.69928	-7630.41112	1010	4	2	test route mid
+6	33	4226.664	-7630.38664	1010	4	3	test route bottom
+6	41	4226.73072	-7630.4356	1000	5	1	test route top
+6	42	4226.69928	-7630.41112	1000	5	2	test route mid
+6	43	4226.664	-7630.38664	1000	5	3	test route bottom
+6	51	4226.73072	-7630.4356	1010	6	1	test route top
+6	52	4226.69928	-7630.41112	1010	6	2	test route mid
+6	53	4226.664	-7630.38664	1010	6	3	test route bottom
+7	1	4226.73072	-7630.4356	1000	1	1	test route top
+7	2	4226.69928	-7630.41112	1000	1	2	test route mid
+7	3	4226.664	-7630.38664	1000	1	3	test route bottom
+7	11	4226.73072	-7630.4356	1010	2	1	test route top
+7	12	4226.69928	-7630.41112	1010	2	2	test route mid
+7	13	4226.664	-7630.38664	1010	2	3	test route bottom
+7	21	4226.73072	-7630.4356	1000	3	1	test route top
+7	22	4226.69928	-7630.41112	1000	3	2	test route mid
+7	23	4226.664	-7630.38664	1000	3	3	test route bottom
+7	31	4226.73072	-7630.4356	1010	4	1	test route top
+7	32	4226.69928	-7630.41112	1010	4	2	test route mid
+7	33	4226.664	-7630.38664	1010	4	3	test route bottom
+7	41	4226.73072	-7630.4356	1000	5	1	test route top
+7	42	4226.69928	-7630.41112	1000	5	2	test route mid
+7	43	4226.664	-7630.38664	1000	5	3	test route bottom
+7	51	4226.73072	-7630.4356	1010	6	1	test route top
+7	52	4226.69928	-7630.41112	1010	6	2	test route mid
+7	53	4226.664	-7630.38664	1010	6	3	test route bottom
+8	1	4226.73072	-7630.4356	1000	1	1	test route top
+8	2	4226.69928	-7630.41112	1000	1	2	test route mid
+8	3	4226.664	-7630.38664	1000	1	3	test route bottom
+8	11	4226.73072	-7630.4356	1010	2	1	test route top
+8	12	4226.69928	-7630.41112	1010	2	2	test route mid
+8	13	4226.664	-7630.38664	1010	2	3	test route bottom
+8	21	4226.73072	-7630.4356	1000	3	1	test route top
+8	22	4226.69928	-7630.41112	1000	3	2	test route mid
+8	23	4226.664	-7630.38664	1000	3	3	test route bottom
+8	31	4226.73072	-7630.4356	1010	4	1	test route top
+8	32	4226.69928	-7630.41112	1010	4	2	test route mid
+8	33	4226.664	-7630.38664	1010	4	3	test route bottom
+8	41	4226.73072	-7630.4356	1000	5	1	test route top
+8	42	4226.69928	-7630.41112	1000	5	2	test route mid
+8	43	4226.664	-7630.38664	1000	5	3	test route bottom
+8	51	4226.73072	-7630.4356	1010	6	1	test route top
+8	52	4226.69928	-7630.41112	1010	6	2	test route mid
+8	53	4226.664	-7630.38664	1010	6	3	test route bottom
+9	1	4226.73072	-7630.4356	1000	1	1	test route top
+9	2	4226.69928	-7630.41112	1000	1	2	test route mid
+9	3	4226.664	-7630.38664	1000	1	3	test route bottom
+9	11	4226.73072	-7630.4356	1010	2	1	test route top
+9	12	4226.69928	-7630.41112	1010	2	2	test route mid
+9	13	4226.664	-7630.38664	1010	2	3	test route bottom
+9	21	4226.73072	-7630.4356	1000	3	1	test route top
+9	22	4226.69928	-7630.41112	1000	3	2	test route mid
+9	23	4226.664	-7630.38664	1000	3	3	test route bottom
+9	31	4226.73072	-7630.4356	1010	4	1	test route top
+9	32	4226.69928	-7630.41112	1010	4	2	test route mid
+9	33	4226.664	-7630.38664	1010	4	3	test route bottom
+9	41	4226.73072	-7630.4356	1000	5	1	test route top
+9	42	4226.69928	-7630.41112	1000	5	2	test route mid
+9	43	4226.664	-7630.38664	1000	5	3	test route bottom
+9	51	4226.73072	-7630.4356	1010	6	1	test route top
+9	52	4226.69928	-7630.41112	1010	6	2	test route mid
+9	53	4226.664	-7630.38664	1010	6	3	test route bottom
+10	1	4226.73072	-7630.4356	1000	1	1	test route top
+10	2	4226.69928	-7630.41112	1000	1	2	test route mid
+10	3	4226.664	-7630.38664	1000	1	3	test route bottom
+10	11	4226.73072	-7630.4356	1010	2	1	test route top
+10	12	4226.69928	-7630.41112	1010	2	2	test route mid
+10	13	4226.664	-7630.38664	1010	2	3	test route bottom
+10	21	4226.73072	-7630.4356	1000	3	1	test route top
+10	22	4226.69928	-7630.41112	1000	3	2	test route mid
+10	23	4226.664	-7630.38664	1000	3	3	test route bottom
+10	31	4226.73072	-7630.4356	1010	4	1	test route top
+10	32	4226.69928	-7630.41112	1010	4	2	test route mid
+10	33	4226.664	-7630.38664	1010	4	3	test route bottom
+10	41	4226.73072	-7630.4356	1000	5	1	test route top
+10	42	4226.69928	-7630.41112	1000	5	2	test route mid
+10	43	4226.664	-7630.38664	1000	5	3	test route bottom
+10	51	4226.73072	-7630.4356	1010	6	1	test route top
+10	52	4226.69928	-7630.41112	1010	6	2	test route mid
+10	53	4226.664	-7630.38664	1010	6	3	test route bottom
+11	1	4226.73072	-7630.4356	1000	1	1	test route top
+11	2	4226.69928	-7630.41112	1000	1	2	test route mid
+11	3	4226.664	-7630.38664	1000	1	3	test route bottom
+11	11	4226.73072	-7630.4356	1010	2	1	test route top
+11	12	4226.69928	-7630.41112	1010	2	2	test route mid
+11	13	4226.664	-7630.38664	1010	2	3	test route bottom
+11	21	4226.73072	-7630.4356	1000	3	1	test route top
+11	22	4226.69928	-7630.41112	1000	3	2	test route mid
+11	23	4226.664	-7630.38664	1000	3	3	test route bottom
+11	31	4226.73072	-7630.4356	1010	4	1	test route top
+11	32	4226.69928	-7630.41112	1010	4	2	test route mid
+11	33	4226.664	-7630.38664	1010	4	3	test route bottom
+11	41	4226.73072	-7630.4356	1000	5	1	test route top
+11	42	4226.69928	-7630.41112	1000	5	2	test route mid
+11	43	4226.664	-7630.38664	1000	5	3	test route bottom
+11	51	4226.73072	-7630.4356	1010	6	1	test route top
+11	52	4226.69928	-7630.41112	1010	6	2	test route mid
+11	53	4226.664	-7630.38664	1010	6	3	test route bottom
+12	1	4226.73072	-7630.4356	1000	1	1	test route top
+12	2	4226.69928	-7630.41112	1000	1	2	test route mid
+12	3	4226.664	-7630.38664	1000	1	3	test route bottom
+12	11	4226.73072	-7630.4356	1010	2	1	test route top
+12	12	4226.69928	-7630.41112	1010	2	2	test route mid
+12	13	4226.664	-7630.38664	1010	2	3	test route bottom
+12	21	4226.73072	-7630.4356	1000	3	1	test route top
+12	22	4226.69928	-7630.41112	1000	3	2	test route mid
+12	23	4226.664	-7630.38664	1000	3	3	test route bottom
+12	31	4226.73072	-7630.4356	1010	4	1	test route top
+12	32	4226.69928	-7630.41112	1010	4	2	test route mid
+12	33	4226.664	-7630.38664	1010	4	3	test route bottom
+12	41	4226.73072	-7630.4356	1000	5	1	test route top
+12	42	4226.69928	-7630.41112	1000	5	2	test route mid
+12	43	4226.664	-7630.38664	1000	5	3	test route bottom
+12	51	4226.73072	-7630.4356	1010	6	1	test route top
+12	52	4226.69928	-7630.41112	1010	6	2	test route mid
+12	53	4226.664	-7630.38664	1010	6	3	test route bottom
+13	1	4226.73072	-7630.4356	1000	1	1	test route top
+13	2	4226.69928	-7630.41112	1000	1	2	test route mid
+13	3	4226.664	-7630.38664	1000	1	3	test route bottom
+13	11	4226.73072	-7630.4356	1010	2	1	test route top
+13	12	4226.69928	-7630.41112	1010	2	2	test route mid
+13	13	4226.664	-7630.38664	1010	2	3	test route bottom
+13	21	4226.73072	-7630.4356	1000	3	1	test route top
+13	22	4226.69928	-7630.41112	1000	3	2	test route mid
+13	23	4226.664	-7630.38664	1000	3	3	test route bottom
+13	31	4226.73072	-7630.4356	1010	4	1	test route top
+13	32	4226.69928	-7630.41112	1010	4	2	test route mid
+13	33	4226.664	-7630.38664	1010	4	3	test route bottom
+13	41	4226.73072	-7630.4356	1000	5	1	test route top
+13	42	4226.69928	-7630.41112	1000	5	2	test route mid
+13	43	4226.664	-7630.38664	1000	5	3	test route bottom
+13	51	4226.73072	-7630.4356	1010	6	1	test route top
+13	52	4226.69928	-7630.41112	1010	6	2	test route mid
+13	53	4226.664	-7630.38664	1010	6	3	test route bottom
+14	1	4226.73072	-7630.4356	1000	1	1	test route top
+14	2	4226.69928	-7630.41112	1000	1	2	test route mid
+14	3	4226.664	-7630.38664	1000	1	3	test route bottom
+14	11	4226.73072	-7630.4356	1010	2	1	test route top
+14	12	4226.69928	-7630.41112	1010	2	2	test route mid
+14	13	4226.664	-7630.38664	1010	2	3	test route bottom
+14	21	4226.73072	-7630.4356	1000	3	1	test route top
+14	22	4226.69928	-7630.41112	1000	3	2	test route mid
+14	23	4226.664	-7630.38664	1000	3	3	test route bottom
+14	31	4226.73072	-7630.4356	1010	4	1	test route top
+14	32	4226.69928	-7630.41112	1010	4	2	test route mid
+14	33	4226.664	-7630.38664	1010	4	3	test route bottom
+14	41	4226.73072	-7630.4356	1000	5	1	test route top
+14	42	4226.69928	-7630.41112	1000	5	2	test route mid
+14	43	4226.664	-7630.38664	1000	5	3	test route bottom
+14	51	4226.73072	-7630.4356	1010	6	1	test route top
+14	52	4226.69928	-7630.41112	1010	6	2	test route mid
+14	53	4226.664	-7630.38664	1010	6	3	test route bottom
+15	1	4226.73072	-7630.4356	1000	1	1	test route top
+15	2	4226.69928	-7630.41112	1000	1	2	test route mid
+15	3	4226.664	-7630.38664	1000	1	3	test route bottom
+15	11	4226.73072	-7630.4356	1010	2	1	test route top
+15	12	4226.69928	-7630.41112	1010	2	2	test route mid
+15	13	4226.664	-7630.38664	1010	2	3	test route bottom
+15	21	4226.73072	-7630.4356	1000	3	1	test route top
+15	22	4226.69928	-7630.41112	1000	3	2	test route mid
+15	23	4226.664	-7630.38664	1000	3	3	test route bottom
+15	31	4226.73072	-7630.4356	1010	4	1	test route top
+15	32	4226.69928	-7630.41112	1010	4	2	test route mid
+15	33	4226.664	-7630.38664	1010	4	3	test route bottom
+15	41	4226.73072	-7630.4356	1000	5	1	test route top
+15	42	4226.69928	-7630.41112	1000	5	2	test route mid
+15	43	4226.664	-7630.38664	1000	5	3	test route bottom
+15	51	4226.73072	-7630.4356	1010	6	1	test route top
+15	52	4226.69928	-7630.41112	1010	6	2	test route mid
+15	53	4226.664	-7630.38664	1010	6	3	test route bottom
+16	1	4226.73072	-7630.4356	1000	1	1	test route top
+16	2	4226.69928	-7630.41112	1000	1	2	test route mid
+16	3	4226.664	-7630.38664	1000	1	3	test route bottom
+16	11	4226.73072	-7630.4356	1010	2	1	test route top
+16	12	4226.69928	-7630.41112	1010	2	2	test route mid
+16	13	4226.664	-7630.38664	1010	2	3	test route bottom
+16	21	4226.73072	-7630.4356	1000	3	1	test route top
+16	22	4226.69928	-7630.41112	1000	3	2	test route mid
+16	23	4226.664	-7630.38664	1000	3	3	test route bottom
+16	31	4226.73072	-7630.4356	1010	4	1	test route top
+16	32	4226.69928	-7630.41112	1010	4	2	test route mid
+16	33	4226.664	-7630.38664	1010	4	3	test route bottom
+16	41	4226.73072	-7630.4356	1000	5	1	test route top
+16	42	4226.69928	-7630.41112	1000	5	2	test route mid
+16	43	4226.664	-7630.38664	1000	5	3	test route bottom
+16	51	4226.73072	-7630.4356	1010	6	1	test route top
+16	52	4226.69928	-7630.41112	1010	6	2	test route mid
+16	53	4226.664	-7630.38664	1010	6	3	test route bottom
+17	1	4226.73072	-7630.4356	1000	1	1	test route top
+17	2	4226.69928	-7630.41112	1000	1	2	test route mid
+17	3	4226.664	-7630.38664	1000	1	3	test route bottom
+17	11	4226.73072	-7630.4356	1010	2	1	test route top
+17	12	4226.69928	-7630.41112	1010	2	2	test route mid
+17	13	4226.664	-7630.38664	1010	2	3	test route bottom
+17	21	4226.73072	-7630.4356	1000	3	1	test route top
+17	22	4226.69928	-7630.41112	1000	3	2	test route mid
+17	23	4226.664	-7630.38664	1000	3	3	test route bottom
+17	31	4226.73072	-7630.4356	1010	4	1	test route top
+17	32	4226.69928	-7630.41112	1010	4	2	test route mid
+17	33	4226.664	-7630.38664	1010	4	3	test route bottom
+17	41	4226.73072	-7630.4356	1000	5	1	test route top
+17	42	4226.69928	-7630.41112	1000	5	2	test route mid
+17	43	4226.664	-7630.38664	1000	5	3	test route bottom
+17	51	4226.73072	-7630.4356	1010	6	1	test route top
+17	52	4226.69928	-7630.41112	1010	6	2	test route mid
+17	53	4226.664	-7630.38664	1010	6	3	test route bottom
+18	1	4226.73072	-7630.4356	1000	1	1	test route top
+18	2	4226.69928	-7630.41112	1000	1	2	test route mid
+18	3	4226.664	-7630.38664	1000	1	3	test route bottom
+18	11	4226.73072	-7630.4356	1010	2	1	test route top
+18	12	4226.69928	-7630.41112	1010	2	2	test route mid
+18	13	4226.664	-7630.38664	1010	2	3	test route bottom
+18	21	4226.73072	-7630.4356	1000	3	1	test route top
+18	22	4226.69928	-7630.41112	1000	3	2	test route mid
+18	23	4226.664	-7630.38664	1000	3	3	test route bottom
+18	31	4226.73072	-7630.4356	1010	4	1	test route top
+18	32	4226.69928	-7630.41112	1010	4	2	test route mid
+18	33	4226.664	-7630.38664	1010	4	3	test route bottom
+18	41	4226.73072	-7630.4356	1000	5	1	test route top
+18	42	4226.69928	-7630.41112	1000	5	2	test route mid
+18	43	4226.664	-7630.38664	1000	5	3	test route bottom
+18	51	4226.73072	-7630.4356	1010	6	1	test route top
+18	52	4226.69928	-7630.41112	1010	6	2	test route mid
+18	53	4226.664	-7630.38664	1010	6	3	test route bottom
+19	1	4226.73072	-7630.4356	1000	1	1	test route top
+19	2	4226.69928	-7630.41112	1000	1	2	test route mid
+19	3	4226.664	-7630.38664	1000	1	3	test route bottom
+19	11	4226.73072	-7630.4356	1010	2	1	test route top
+19	12	4226.69928	-7630.41112	1010	2	2	test route mid
+19	13	4226.664	-7630.38664	1010	2	3	test route bottom
+19	21	4226.73072	-7630.4356	1000	3	1	test route top
+19	22	4226.69928	-7630.41112	1000	3	2	test route mid
+19	23	4226.664	-7630.38664	1000	3	3	test route bottom
+19	31	4226.73072	-7630.4356	1010	4	1	test route top
+19	32	4226.69928	-7630.41112	1010	4	2	test route mid
+19	33	4226.664	-7630.38664	1010	4	3	test route bottom
+19	41	4226.73072	-7630.4356	1000	5	1	test route top
+19	42	4226.69928	-7630.41112	1000	5	2	test route mid
+19	43	4226.664	-7630.38664	1000	5	3	test route bottom
+19	51	4226.73072	-7630.4356	1010	6	1	test route top
+19	52	4226.69928	-7630.41112	1010	6	2	test route mid
+19	53	4226.664	-7630.38664	1010	6	3	test route bottom
+20	1	4226.73072	-7630.4356	1000	1	1	test route top
+20	2	4226.69928	-7630.41112	1000	1	2	test route mid
+20	3	4226.664	-7630.38664	1000	1	3	test route bottom
+20	11	4226.73072	-7630.4356	1010	2	1	test route top
+20	12	4226.69928	-7630.41112	1010	2	2	test route mid
+20	13	4226.664	-7630.38664	1010	2	3	test route bottom
+20	21	4226.73072	-7630.4356	1000	3	1	test route top
+20	22	4226.69928	-7630.41112	1000	3	2	test route mid
+20	23	4226.664	-7630.38664	1000	3	3	test route bottom
+20	31	4226.73072	-7630.4356	1010	4	1	test route top
+20	32	4226.69928	-7630.41112	1010	4	2	test route mid
+20	33	4226.664	-7630.38664	1010	4	3	test route bottom
+20	41	4226.73072	-7630.4356	1000	5	1	test route top
+20	42	4226.69928	-7630.41112	1000	5	2	test route mid
+20	43	4226.664	-7630.38664	1000	5	3	test route bottom
+20	51	4226.73072	-7630.4356	1010	6	1	test route top
+20	52	4226.69928	-7630.41112	1010	6	2	test route mid
+20	53	4226.664	-7630.38664	1010	6	3	test route bottom
+21	1	4226.73072	-7630.4356	1000	1	1	test route top
+21	2	4226.69928	-7630.41112	1000	1	2	test route mid
+21	3	4226.664	-7630.38664	1000	1	3	test route bottom
+21	11	4226.73072	-7630.4356	1010	2	1	test route top
+21	12	4226.69928	-7630.41112	1010	2	2	test route mid
+21	13	4226.664	-7630.38664	1010	2	3	test route bottom
+21	21	4226.73072	-7630.4356	1000	3	1	test route top
+21	22	4226.69928	-7630.41112	1000	3	2	test route mid
+21	23	4226.664	-7630.38664	1000	3	3	test route bottom
+21	31	4226.73072	-7630.4356	1010	4	1	test route top
+21	32	4226.69928	-7630.41112	1010	4	2	test route mid
+21	33	4226.664	-7630.38664	1010	4	3	test route bottom
+21	41	4226.73072	-7630.4356	1000	5	1	test route top
+21	42	4226.69928	-7630.41112	1000	5	2	test route mid
+21	43	4226.664	-7630.38664	1000	5	3	test route bottom
+21	51	4226.73072	-7630.4356	1010	6	1	test route top
+21	52	4226.69928	-7630.41112	1010	6	2	test route mid
+21	53	4226.664	-7630.38664	1010	6	3	test route bottom
+22	1	4226.73072	-7630.4356	1000	1	1	test route top
+22	2	4226.69928	-7630.41112	1000	1	2	test route mid
+22	3	4226.664	-7630.38664	1000	1	3	test route bottom
+22	11	4226.73072	-7630.4356	1010	2	1	test route top
+22	12	4226.69928	-7630.41112	1010	2	2	test route mid
+22	13	4226.664	-7630.38664	1010	2	3	test route bottom
+22	21	4226.73072	-7630.4356	1000	3	1	test route top
+22	22	4226.69928	-7630.41112	1000	3	2	test route mid
+22	23	4226.664	-7630.38664	1000	3	3	test route bottom
+22	31	4226.73072	-7630.4356	1010	4	1	test route top
+22	32	4226.69928	-7630.41112	1010	4	2	test route mid
+22	33	4226.664	-7630.38664	1010	4	3	test route bottom
+22	41	4226.73072	-7630.4356	1000	5	1	test route top
+22	42	4226.69928	-7630.41112	1000	5	2	test route mid
+22	43	4226.664	-7630.38664	1000	5	3	test route bottom
+22	51	4226.73072	-7630.4356	1010	6	1	test route top
+22	52	4226.69928	-7630.41112	1010	6	2	test route mid
+22	53	4226.664	-7630.38664	1010	6	3	test route bottom
+23	1	4226.73072	-7630.4356	1000	1	1	test route top
+23	2	4226.69928	-7630.41112	1000	1	2	test route mid
+23	3	4226.664	-7630.38664	1000	1	3	test route bottom
+23	11	4226.73072	-7630.4356	1010	2	1	test route top
+23	12	4226.69928	-7630.41112	1010	2	2	test route mid
+23	13	4226.664	-7630.38664	1010	2	3	test route bottom
+23	21	4226.73072	-7630.4356	1000	3	1	test route top
+23	22	4226.69928	-7630.41112	1000	3	2	test route mid
+23	23	4226.664	-7630.38664	1000	3	3	test route bottom
+23	31	4226.73072	-7630.4356	1010	4	1	test route top
+23	32	4226.69928	-7630.41112	1010	4	2	test route mid
+23	33	4226.664	-7630.38664	1010	4	3	test route bottom
+23	41	4226.73072	-7630.4356	1000	5	1	test route top
+23	42	4226.69928	-7630.41112	1000	5	2	test route mid
+23	43	4226.664	-7630.38664	1000	5	3	test route bottom
+23	51	4226.73072	-7630.4356	1010	6	1	test route top
+23	52	4226.69928	-7630.41112	1010	6	2	test route mid
+23	53	4226.664	-7630.38664	1010	6	3	test route bottom

+ 283 - 0
aux/data/common_values.sh

@@ -0,0 +1,283 @@
+#!/bin/bash
+#
+# Copyright (c) 2019 Clementine Computing LLC.
+# 
+# This file is part of PopuFare.
+# 
+# PopuFare is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# PopuFare is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+# 
+# You should have received a copy of the GNU Affero General Public License
+# along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
+#
+
+#THIS FILE IS NOT REALLY A SCRIPT, BUT RATHER A CENTRAL HOLDING TANK FOR SYSTEM CONFIG VALUES...
+#IT SHOULD BE SOURCED BY ALL OTHER SCRIPTS THAT NEED A CONTAINED VALUE, AND MAY SOME DAY BE PARSED
+#BY THE NATIVE APPLICATIONS.  THUS:  Keep it simple, in the following format:
+#
+##Comment on meaning of variable
+#VARIABLE="value"
+#
+#(variable name in all caps, no space, equals sign, quoted literal value (if there is even a remote chance that the value
+#is one that will be needed by the native app in the future)
+#
+
+BASEDIR='/home/bus'
+
+#How long to sleep after a dial attempt before checking if we have a PPP session successfully constructed
+SLEEP_AFTER_DIAL="30"
+
+#How long to wait between redial attempts     
+SLEEP_BETWEEN_REDIALS="60"
+
+# How long to sleep after the GRPS session comes up before testing the SSH tunnel (attempting to connect to the 'hello' server)
+#
+SLEEP_BEFORE_TUNNEL_TEST="30"
+
+# How long to sleep after an established tunnel goes down before allowing any SSH tunnel establishment retries
+#
+SLEEP_AFTER_TUNNEL_FAILURE="60"
+
+# How long to sleep after an established tunnel has been aborted
+#
+SLEEP_AFTER_TUNNEL_ABORT="60"
+
+# How many successive ssh tunnel failures do we accept before forcing a hard termination of pppd and a modem reset and redail
+#
+MAX_FAIL_HANGUP="5"
+
+# How frequently to test an SSH tunnel that predates the ppp-dialer.sh process (thus having no right to wait for its PID)
+#
+SLEEP_MONITORING_TUNNEL="120"
+
+#  How frequently to perform SSH keepalive messages, and how many of them are allowed to drop before we tear the tunnel down
+# and wait to try again.  This gets passed to the SSH client in the following form:
+# -o ServerAliveInterval=$SSH_SERVER_ALIVE_INTERVAL -o ServerAliveCountMax=$SSH_SERVER_ALIVE_MAXDROP
+#
+SSH_SERVER_ALIVE_INTERVAL="15"
+SSH_SERVER_ALIVE_MAXDROP="3"
+
+# These are the default server parameters the system will use if there is not a configured sync server.
+#The system will check 
+SSH_DEFAULT_TARGET="bus@example.com"
+SSH_DEFAULT_PORT="6055"
+SSH_DEFAULT_IDENTITY="$BASEDIR/.ssh/id_rsa_bus"
+
+#This regular expression test is used to make sure we have a valid-looking FQDN or IP address
+SSH_TARGET_VALIDITY_CHECK="^[a-zA-Z][a-zA-Z0-9]*@([a-zA-Z0-9-]+\.)+([a-zA-Z0-9-]+)$"
+
+SSH_TARGET="$SSH_DEFAULT_TARGET"
+SSH_PORT="$SSH_DEFAULT_PORT"
+SSH_IDENTITY="$SSH_DEFAULT_IDENTITY"
+
+#--------------------------------------------------------------------------------
+#This is the list of forwarded ports we bring live when we set up our SSH tunnel:
+
+# 2857 -> AVLS
+AVLS_DAEMON_PORT="2857"
+
+# 7277 -> Bus Pass Daemon
+PASSDB_DAEMON_PORT="7277"
+
+# 2455 -> Billing Log Daemon
+BILLDB_DAEMON_PORT="2455"
+
+# 3556 -> "Hello" Daemon
+HELLO_DAEMON_PORT="3556"
+
+# 8377 -> Update / Version Server
+UPDATE_DAEMON_PORT="8377"
+
+
+#    These are used to talk to the "Hello" daemon on the server to verify that
+#actual data can flow before notifying the system that the tunnel is up.
+HELLO_DAEMON_MESSAGE="Hello."
+
+
+#--------------------------------------------------------------------------------
+#    This is a list of base ports on the server that we can use for the reverse-phone-home
+#functionality which forwards port BASE + client_id on the server to port 22 (sshd) on 
+#the client to allow for remote troubleshooting and manual configuration.
+
+#Enable reverse-phone-home feature
+REVERSE_PHONE_HOME="1"
+
+#    This is the base port (on the server) which the numbering for the reverse-phone-home
+#system starts at when numbered by equipment number:
+REVERSE_PHONE_HOME_EQNUM_BASE="10000"
+
+#    This is the base port (on the server) which the numbering for the reverse-phone-home
+#system starts at when numbered by serial number (wireless_ip on transition busses):
+REVERSE_PHONE_HOME_SERIALNUM_BASE="30000"
+
+#    This is the number above which an equipment number or other token will not be considered
+#as a phone home candidate on account of its likelyhood to overflow into the next port range.
+REVERSE_PHONE_HOME_MAX_TOKEN="19999"
+
+
+#--------------------------------------------------------------------------------
+#These paths lead to dropfiles in /tmp which are used to signal network state
+
+#This dropfile means we have an established GPRS/PPP session
+GPRS_DROPFILE="/tmp/network-is-up"
+#This dropfile means we have an established SSH tunnel to the server
+TUNNEL_DROPFILE="/tmp/tunnel-is-up"
+#This dropfile contains the process ID of our SSH client that's keeping the tunnel open
+SSH_TUNNEL_PIDFILE="/tmp/ssh_tunnel.pid"
+#This dropfile contains identifying information about our ethernet card, cell modem, and SIM
+NETWORK_ID_DROPFILE="/tmp/net_ids"
+
+#This dropfile becomes present to notify the update process to abort:
+UPDATE_ABORT_DROPFILE="/tmp/abort_update"
+TUNNEL_ABORT_DROPFILE="/tmp/abort_tunnel"
+
+
+#############################################################
+
+FIX_PACKAGE_PERMS="1"
+
+########################################################## Used only if FIX_PACKAGE_PERMS is nonzero ##############
+#This specifies who should own installed packages
+PACKAGE_OWNER_STRING="root:root"
+
+#These are the permissions applied to stuff in the bin directory
+PACKAGE_BIN_PERMISSIONS="755"
+#This is the egrep expression that must match to qualify something as a binary
+PACKAGE_BIN_PATTERN='(^[/]?'$BASEDIR'/bin/[a-z_A-Z0-9.]+$)|(.*\.sh$)'
+
+#These are the permissions applied to SSH related config files and directories
+PACKAGE_SSH_STRICT_FILE_PERMISSIONS="600"
+PACKAGE_SSH_MILD_FILE_PERMISSIONS="644"
+PACKAGE_SSH_DIR_PERMISSIONS="700"
+
+#this one is only used in its ALWAYS case
+PACKAGE_SYS_DIR_PERMISSIONS="755"
+
+#These are the egrep expressions that must match to qualify something as an SSH file or directory
+PACKAGE_SSH_STRICT_FILE_PATTERN="(^[/]?etc/ppp/id_rsa[^\.]*$)|(^[/]?root/\.ssh/id_rsa[^\.]*$)|(^[/]?root/\.ssh/authorized_keys)"
+PACKAGE_SSH_MILD_FILE_PATTERN="(^[/]?root/\.ssh/known_hosts)|(^[/]?etc/ppp/id_rsa[^\.]*.pub$)|(^[/]?root/\.ssh/id_rsa[^\.]*.pub)"
+PACKAGE_SSH_DIR_PATTERN="(^[/]?root[/]?$)|(^[/]?root/\.ssh[/]?$)"
+
+#These are the list of files to ALWAYS reset permissions on (whether or not they are in the update)
+ALWAYS_SSH_DIR_LIST="/root /root/.ssh"
+ALWAYS_SSH_STRICT_FILE_LIST="/root/.ssh/id_rsa /etc/ppp/id_rsa_bus /root/.ssh/authorized_keys $SYNC_PRIVATE_KEY"
+ALWAYS_SSH_MILD_FILE_LIST="/root/.ssh/known_hosts /root/.ssh/id_rsa.pub /etc/ppp/id_rsa_bus.pub /etc/ssh/sshd_config"
+ALWAYS_BIN_LIST="$BASEDIR/bin/init_bus.sh $BASEDIR/bin/update_loop.sh $BASEDIR/bin/apply_update.sh $BASEDIR/bin/fix_pkg_perm.sh $BASEDIR/bin/get_net_ids.sh"
+
+ALWAYS_SYS_DIR_LIST="/etc /etc/ssh /etc/ppp"
+
+#DEFAULT_EXTRACT_PATH="/"
+DEFAULT_EXTRACT_PATH="/home/bus"
+EXTRACT_PATH_FILE="/tmp/pkg_extract_path"
+
+##################################################################################################################
+
+
+#These paths point to important bits of information for synchronizing
+EQUIP_NUM_FILE="$BASEDIR/config/equipnum.txt"
+SERIAL_NUM_FILE="$BASEDIR/config/serial_num"
+
+SERVER_CONFIG_DIR="$BASEDIR/config/server"
+
+SERVER_LIST_FILE="$SERVER_CONFIG_DIR/server_list"
+
+SYNC_DESC_FILE="$SERVER_CONFIG_DIR/sync_server_desc"
+SYNC_TARGET_FILE="$SERVER_CONFIG_DIR/sync_target"
+SYNC_PORT_FILE="$SERVER_CONFIG_DIR/sync_port"
+SYNC_KNOWN_HOSTS="/root/.ssh/known_hosts"
+SYNC_PRIVATE_KEY="/etc/ppp/id_rsa_client"
+
+###############################################################################################
+#     CONFIGURATION VALUES USED PRIMARILY BY THE UPDATE LOOP SCRIPT                           #
+###############################################################################################
+
+#How long for update_loop.sh to sleep after spawning the client supervisor before (potentially) respawning it
+SLEEP_AFTER_SPAWN="60"
+
+#How long to sleep between attempts to download patches from the server
+SLEEP_BETWEEN_UPDATES="60"
+
+#The directory in which the current patch state is to be found
+CHECKSUM_AND_VERSION_PATH="$BASEDIR/config/"
+
+###############################################################################################
+#     BELOW HERE, COMPOUND OPTIONS ARE ALLOWED (things that use variable substitution, etc...)#
+###############################################################################################
+
+#This looks for all environment variables that specify a port that we must forward...
+TUNNEL_PORT_LIST="`set | egrep "^[A-Z]+_DAEMON_PORT=" | cut -d '=' -f2 | egrep '^[0-9]+$' | xargs echo`"
+
+#This gathers the above list into something we can just hand to the SSH client...
+SSH_FORWARDS="`for port in $TUNNEL_PORT_LIST; do echo -n " -L$port:localhost:$port"; done`"
+
+#These are the flags to SSH that are specific to setting up the tunnel
+SSH_TUNNEL_FLAGS="-n -N -x"
+
+#These are the flags to SSH that are specific to our connection to the target host
+SSH_TARGET_OPTIONS="-o StrictHostKeyChecking=no"
+
+#These are the flags to SSH that specify the behavior of the protocol-level keepalive messages
+SSH_KEEPALIVE_OPTIONS="-o ServerAliveInterval=$SSH_SERVER_ALIVE_INTERVAL -o ServerAliveCountMax=$SSH_SERVER_ALIVE_MAXDROP"
+
+SSH_OPTIONS="$SSH_TUNNEL_FLAGS $SSH_KEEPALIVE_OPTIONS $SSH_TARGET_OPTIONS"
+SCP_OPTIONS="$SSH_KEEPALIVE_OPTIONS $SSH_TARGET_OPTIONS"
+
+# This function kills any currently open SSH or SCP sessions and puts dropfiles in /tmp telling
+#ppp-dialer.sh and update_loop.sh to refresh their Sync server parameters with the generate_ssh_targets
+#function before attempting to reconnect. 
+#
+abort_tunnel_and_update() {
+
+  touch $UPDATE_ABORT_DROPFILE
+  touch $TUNNEL_ABORT_DROPFILE
+
+  sync
+  sleep 1
+
+  killall ssh
+  killall scp
+}
+
+# This function uses the dropfiles left by unpack_server_data.sh and constructs new SSH and SCP
+#parameters suitable to connect to the specified server.  If there is no server specified, or if the
+#specified server does not pass a sanity check then the default server will be used.
+#
+function generate_ssh_targets
+{
+
+  if [ -f $SYNC_TARGET_FILE ]; then
+
+    alt_target="`cat $SYNC_TARGET_FILE`"
+    if echo "$alt_target" | egrep -q "$SSH_TARGET_VALIDITY_CHECK"; then
+
+      SSH_TARGET="`cat $SYNC_TARGET_FILE`"
+      SSH_PORT="`cat $SYNC_PORT_FILE`"
+      SSH_IDENTITY="$SYNC_PRIVATE_KEY"
+
+      echo "$0: Using sync server $SSH_TARGET port $SSH_PORT"
+    else
+
+      SSH_TARGET="$SSH_DEFAULT_SYNC_TARGET"
+      SSH_PORT="$SSH_DEFAULT_SYNC_PORT"
+      SSH_IDENTITY="$SSH_DEFAULT_IDENTITY"
+
+      echo "$0: Specified sync server name $alt_target is malformed.  Using default $SSH_DEFAULT_SYNC_TARGET port $SSH_DEFAULT_SYNC_PORT"
+    fi
+  else
+
+      SSH_TARGET="$SSH_DEFAULT_TARGET"
+      SSH_PORT="$SSH_DEFAULT_PORT"
+      SSH_IDENTITY="$SSH_DEFAULT_IDENTITY"
+
+      echo "$0: No sync server selected. Using default $SSH_DEFAULT_TARGET port $SSH_DEFAULT_PORT"
+  fi
+
+}
+

+ 106 - 0
aux/data/diu_ui_site_specific.js

@@ -0,0 +1,106 @@
+// Copyright (c) 2019 Clementine Computing LLC.
+//
+// License: CC0
+//
+// To the extent possible under law, the person who associated CC0 with
+// this file has waived all copyright and related or neighboring rights
+// to this file.
+//
+// You should have received a copy of the CC0 legalcode along with this
+// work.  If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
+//
+
+// This file contains 'site specific' information about pass types and
+// how they're displayed in the driver facing UI.
+//
+// BULK_PASS and OVERRIDE_PASS are tied to the HTML elements being displayed.
+// The `ui_bulk_...` and `ui_fareoverride_...` are the IDs of the HTML elements
+// that can be altered depending on need.
+//
+// The BULK_RULE and OVERRIDE_RULE are what gets passed to the underlying
+// Popufare system and should reflect the rules present both in the installation
+// database and in the `rules.scm` file local to the DIU.
+//
+
+//--
+
+// Populate these values with your site specific information
+// for both bulk passes and 'override' pass types.
+//
+var BULK_PASS =  ["adult", "youth", "half",
+                  "event", "transfer", "interline",
+                  "schoola", "schoolb", "schoolc",
+                  "orga", "orgb", "orgc"];
+var BULK_RULE = ["BULK-CASH-ADULT", "BULK-CASH-YOUTH", "BULK-CASH-HALF",
+                 "BULK-MISC-EVENT", "BULK-MISC-TRANSFER", "BULK-MISC-INTERLINE",
+                 "BULK-OVR-SCHOOLA", "BULK-OVR-SCHOOLB", "BULK-OVR-SCHOOLC",
+                 "BULK-OVR-ORGA", "BULK-OVR-ORGB", "BULK-OVR-ORGC"];
+
+// Text to be diplayed in the 'bulk accept' screen
+//
+var BULK_PASS_NAME = ["Adult Cash", "Youth Cash", "Half Cash",
+                      "Special Event", "Transfer", "Interline",
+                      "School A", "School B", "School C",
+                      "Org A", "Org B", "Org C"];
+
+//--
+
+var OVERRIDE_PASS =  [ "adult", "youth", "half",
+                       "bike", "wheelchair", "transfer",
+                       "event", "interline",
+                       "schoola", "schoolb", "schoolc",
+                       "orga", "orgb", "orgc" ];
+var OVERRIDE_RULE = [ "CASH-ADULT", "CASH-YOUTH", "CASH-HALF",
+                      "MISC-BIKE", "MISC-WHEELCHAIR", "MISC-TRANSFER",
+                      "MISC-EVENT", "MISC-INTERLINE",
+                      "OVR-SCHOOLA", "OVR-SCHOOLB", "OVR-SCHOOLC",
+                      "OVR-ORGA", "OVR-ORGB", "OVR-ORGC" ];
+
+//--
+
+// This function can be used after the Popufare UI has been initialized to do
+// any work that couldn't be done otherwise.
+//
+function PopufareSiteInit(data) {
+  var ele = {};
+
+  var ele = document.getElementById("ui_bulk_schoola");
+  if (ele) { ele.innerHTML = "School A"; }
+
+  var ele = document.getElementById("ui_bulk_schoolb");
+  if (ele) { ele.innerHTML = "School B"; }
+
+  var ele = document.getElementById("ui_bulk_schoolc");
+  if (ele) { ele.innerHTML = "School C"; }
+
+  var ele = document.getElementById("ui_bulk_orga");
+  if (ele) { ele.innerHTML = "Org A"; }
+
+  var ele = document.getElementById("ui_bulk_orgb");
+  if (ele) { ele.innerHTML = "Org B"; }
+
+  var ele = document.getElementById("ui_bulk_orgc");
+  if (ele) { ele.innerHTML = "Org C"; }
+
+  //--
+
+  var ele = document.getElementById("ui_fareoverride_schoola");
+  if (ele) { ele.innerHTML = "School A"; }
+
+  var ele = document.getElementById("ui_fareoverride_schoolb");
+  if (ele) { ele.innerHTML = "School B"; }
+
+  var ele = document.getElementById("ui_fareoverride_schoolc");
+  if (ele) { ele.innerHTML = "School C"; }
+
+  var ele = document.getElementById("ui_fareoverride_orga");
+  if (ele) { ele.innerHTML = "Org A"; }
+
+  var ele = document.getElementById("ui_fareoverride_orgb");
+  if (ele) { ele.innerHTML = "Org B"; }
+
+  var ele = document.getElementById("ui_fareoverride_orgc");
+  if (ele) { ele.innerHTML = "Org C"; }
+
+}
+

+ 1 - 0
aux/data/id_rsa

@@ -0,0 +1 @@
+snakeoil_id_rsa.privkey

+ 27 - 0
aux/data/snakeoil_id_rsa.privkey

@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEA0gwlzUCngi8nk++kRSkXELCn3hwxivfOPdLiKeQh+yqMSBzO
+08+AbOkPpMyRm4nqtgpXwqA5M0Q2sY+6KdbApih6Y0EyCubp+xeNSDioghLB37X6
+H0rpk47PS2lQiHokGDkxqUDVrix7LltFZTedZZmqvcnvDNfQ7H78DvDfEt2Q4Zqr
+OncZ2k/zOI77AGWMsOVEDSRfl0lCJx+88uHHZyR35Y9XrcQ9mr7YzBiiVJsEz2zL
+XNyWlJ/Z3aoWqbgw3n2L161im0v0dD1hiWcAljBUUexQK8vwhVBK5fEYjmM8ibaA
+6Xk/jb/hPZ2CPFlqZwGy46p6Y5AGUhDbnXJktwIDAQABAoIBAALMSKCgUNrqF+Pf
+mFeXgYgmYkYSKBLK1EN8kKiwMkevPGklgRfPNs28mQm/89yXjLnaD2s3SSvGp9fb
+q0YtZymPdnnl/22nv8wpdydUIeKBr3V0bh2GmO/vQhGmGH2I6vwrnt67T11fmFB4
+xMbhY8ZbsquOihGouk68Lk1gpggRR1OQba6763tbEfq0OBo2wRZD+Et4DCmFZJz8
+5hO5KuUTSo+9XkqwAyclkSFLNEUaQ32aU8WlnaIgmq8HnbyEoJ3FBbRtiVy25aQU
+yIHpdKSRlUPzLcq/jlE9gXxpsjVAD6JixHWTzIkeoLPfP8CqV1PwMe4xOrg/YJ8u
+/FUUmHkCgYEA7sMMtX4ujzTRvCeTqfgJ3AorwihsPhBgS74c5KTgnIyoXYahWwwP
+xR3qtUaXjV9z1wL2rlwmHihRuC/h3zTlhnUZwyMRqGNDO4Jvvy3AqSJXWIacRtBd
+4V4FL1Uf9uYqBxVsmfPBwXkdKhA81DwcejYy86QjoqC2OoQgVlhG350CgYEA4TZh
+BYXbZHG4eNGVU0BozDXPVhJdVY6qK2AQUKUGjscThbAtnG6XfIvdvAxMIhBEn1KG
+t9eLky7ysg+jCyMx7gi526JbRpupBXys6WlxZTpOVDJnR0CklTmGt00GUcO1k789
+oadYcvYXL0KBVu7ox6QxBYM3/JHZ1Zw0G68NJ2MCgYBwGo62DJfpz2AGmwJ/FKH0
+eaYQFJC2F1RPW+UPCccYWgaXWyYZrLEe2SwhjxKLY1ztgEu4lDWlhULRW1IPTjPS
+jNrav3WD/Y9MurKjLeU+xIwEWbe4nA7oSQ/gKHTIpUroZovGQSghIi+qV1NoRw0L
+6LTFprTAn/rPwMe6ItqsFQKBgFAqKx7sJsv6Ls/SynR32NXX0ZWxs8dgoPIPn78U
+/uCTvD86FwI323RZ1PO67N6zK7oKhimqb+RUMc9wAXlVbdBtCrtDb3oSrndliacM
+AXEm7/rIdjrGp872Sx20LSutnlSZHjcMek9xiY8o/SEUqYdmyoxLyQH+aKvAjkvM
+Y8JBAoGAQtQzgYfAbLUjrksm8GLFP3JpG5ZhKtiLPEWdUkxNxRfojSYW8krecOBH
+uFAJwxx8D201b24tjvJrLN5NkQQ+qsDCX8MG/x3QaJcBh1ysgefwQs+GXyT5uxCz
+t5jrLAVxnHIO4eYHngxcb1wIh4vBWs8Q3bP835J7rAjd3A1tFQo=
+-----END RSA PRIVATE KEY-----