Hardware Reference
In-Depth Information
By default, the output command ( $MINBASE/etc/msg/todo/xmit/cmd ) is symlinked to $MINBASE/bin/mxtodo .
This is currently empty, and there is no reason to bend the standard for the sake of it, so you can edit this file to create
the code that will run whenever a message is sent into the TODO conduit. Because you have a Bearskin command that
does all the processing, it's simply a matter of taking out the arguments and passing them into $MINBASE/bin/todo :
#!/bin/bash
$MINBASE=/usr/local/minerva
CONDUIT=$1; shift
USER=$1; shift
MSG=$*
$MINBASE/bin/todo add $USER $MSG
And, again, you need to ensure that this script can be executed:
chmod ugo+x /usr/local/minerva/bin/mxtodo
And that's it! It's ready for testing:
msgxmit todo steev "Write the web applet for TODO"
Message Relays
Minerva also includes a message-relay system to pass information between different conduits whenever a new
message is received. This works in a similar way to monexec , except that rlyexec is always, and only, called from
msgrcv . A typical invocation would be as follows:
rlyexec email steev command arguments
This would trigger each executable script in the $MINBASE/etc/users/steev/relay/email directory, giving
ample opportunity for the command or message to be processed, which might include retransmission as an SMS, for
example. Each script is executed alphabetically and stops on the first script who's exit code is nonzero. Consequently,
you would adopt the convention by giving each script in the directory a sequential number, similar to how you
ordered your virtual hosts in Chapter 5.
Time-Based Messaging
Some systems aim to be smart. It is, after all, the next stage of home automation. So, being able to target a message
according to certain parameters, such as time , introduces a new level of convenience for the user.
Unfortunately, to be truly accurate, you would need to make every personal and work calendar you have
accessible to the system. And then you would need to understand how to parse it. Neither one is a realistic goal for
the short term. However, you can create an approximate description of your daily routine as it is, for most purposes,
routine.
The Minerva Timing System (MTS) sits in a layer above the messaging conduits to determine which of the
conduits should be used at any given hour of the day or night. So, the computer might want to issue the following
warning, and be sure to send it in the manner where I'm likely to receive it soonest:
mtsxmit steev warn "Disc space is getting low on /dev/sdc1"
Search WWH ::




Custom Search