DESCRIPTION
-----------
-*rrqnet-cron.sh* is a management script for upholding a *rrqnet* plug
-for a nominated VPN confguration. The given _vpn_, or several, is the
-pathname relative to the configuration root directory and with a
+*rrqnet-cron.sh* is a management script for upholding an *rrqnet* plug
+for a nominated VPN confguration. The given _vpn_ (or the several) is
+the pathname relative to the configuration root directory and with a
+.conf+ extension added, as in +/etc/rrqnet/conf.d/+*vpn*+.conf+.
The following is a configuration file example:
VPN=( 0.0.0.0/0=/etc/rrqnet/keys/example.key )
----
-That "server" declaration is allows UDP packets from any host and
-port, requiring the them to use the same transport encryption key. The
-*rrqnet* "server" plug then works like a switch, which forwards
-packets between connections as well as to and from the tap. Actual
-connections are identified by the remote MAC addresses, and it's up to
-the remote ends to resolve IP addresses to the MAC addresses on the
-virtual net, which in the example would be +192.168.10.0/24+.
+That "server" declaration allows UDP packets from any host and port,
+requiring the them to use the same transport encryption key. The
+*rrqnet* "server" plug then works like a switch that forwards packets
+between connections as well as to and from the tap. Connections are
+identified by the remote MAC addresses, and it's up to the remote ends
+to resolve IP addresses to the MAC addresses on the virtual net.
The +VPN+ variable may have multiple remote declarations, and include
both up-links and down-links, with or without thransport encryption
VPN=( 192.168.0.0/16:1400 10.61.4.72:2020=/sec/example.key )
----
-A VPN assignment like that would both allow remotes in IP range
-+192.168.0.0/16+, port 1400, without transport key, and have an
-up-link to that example "server" remote above (though, for the sake of
-example, having its key residing at a different pathname).
+A VPN assignment like the above would downlink remotes in IP range
++192.168.0.0/16+, port 1400, without transport key, and uplink to
++10.61.4.72:2020+.
crontab set up
~~~~~~~~~~~~~~
The script *rrqnet-cron.sh* is intended to be set up in *crontab*, by
-a line as follows:
+a line such as the following:
----
* * * * * /usr/local/sbin/rrqnet-cron.sh tap0-client
----
By that *crontab* line, the script will be invoked every minute for
-unsuting that the *rrqnet* plug declared by
-+/etc/rrqnet/conf.d/tap0-client.conf+, is still running, and otherwise
-start or restart it.
-
-The script uses a lock file that gets named by the `TAP` assignment,
-as in +/var/lock/rrqnet-tap0+, for the example. This allows an
-alternative management set up, for a *rrqnet* cable to be maintained
-with an almost immediate restart when it goes down, through a simple
-loop like the following:
-----
-# while flock /var/lock/rrqnet-tap0 ; do rrqnet-cron.sh tap0 done
-----
-That control loop would be waiting for the running *rrqnet* to release
-the file lock on +/var/lock/rrqnet-tap0+, and then, almost immediately
-restart the virtual cable.
+ensuring that the *rrqnet* plug declared by
++/etc/rrqnet/conf.d/tap0-client.conf+ is still running or otherwise
+restart it.
NOTES
-----
Note that *rrqnet-cron.sh* sources the configuration file and exits
-after optionally spawning a *rrqnet* daemon. On may therefore safely
+after optionally spawning an *rrqnet* daemon. On may therefore safely
just change the cable set up, and kill *rrqnet* in order apply that
changed set up.