Move passwords out to rewrites so that almost everything else can land.
While here, make the MQTT configuration set the timeout to 100 seconds
so that we get LWT messages sent much more promptly.
fixup timeout
* ``nwfnet.conf`` has details of how to get connectivity to the network.
* ``nwfnet.conf2`` sets the SNTP server to use
-* ``nwfmqtt.conf`` sets the MQTT server and credentials
-
-
+* ``nwfmqtt.conf`` sets the MQTT server and credentials; it is derived from
+ ``nwfmqtt.conf.in`` via ``rewrites.sed`` in the configuration directories;
+ note that the latter of which is deliberately not checked in.
+* ``ctfws-misc.conf`` can be used to assign the LCD I2C address
--- /dev/null
+rewrites.sed
--- /dev/null
+{
+ "broker": "kgb.club.cc.cmu.edu",
+ "port": 1883,
+ "secure" : 0,
+ "clean": 1,
+ "keepalive": 100,
+ "user": "@@MQTT_USER@@",
+ "pass": "@@MQTT_PASSWORD@@"
+}
--- /dev/null
+{ "wifi_mode":"station", "sta_essid": "CMU", "sta_pw": "", "keepfile":1 }
--- /dev/null
+{ "sntp": "ntp.cmu.edu" }
--- /dev/null
+../_common/nwfnet.conf
\ No newline at end of file
--- /dev/null
+../_common/nwfnet.conf2
\ No newline at end of file
--- /dev/null
+../_common/nwfnet.conf
\ No newline at end of file
--- /dev/null
+../_common/nwfnet.conf2
\ No newline at end of file
--- /dev/null
+{ "lcd": 63 }
--- /dev/null
+../_common/nwfnet.conf
\ No newline at end of file
--- /dev/null
+../_common/nwfnet.conf2
\ No newline at end of file
echo import core/init.lua init.lua
# Grab our configuration
- for i in conf/${CONFNAME}/*; do echo import $i `basename $i`; done
+ if [ -r conf/${CONFNAME}/rewrites.sed ]; then
+ for i in conf/_common/*.conf.in; do
+ sed -f conf/${CONFNAME}/rewrites.sed < $i \
+ > `dirname $i`/`basename $i .in`
+ done
+ elif [ ! -r conf/${CONFNAME}/nwfmqtt.conf ]; then
+ echo 'NO MQTT CONFIGURATION KNOWN; THIS IS UNLIKELY TO WORK!'
+ fi
+ for i in conf/${CONFNAME}/*.conf; do echo import $i `basename $i`; done
# And all our Lua files
for i in *.lua; do echo import $i $i; done