X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=html%2Fadminmanual-4.html;h=37ff648b53ad8efaf2a2bd64c8a4b50cff9364ab;hb=d2c1a8cb2a31725e3b9084aee3ec43e585e3273f;hp=d7652b3f4c018fd6a63b14c78c172da93847688a;hpb=e674587476599456cce169e02b0e441d985f9dd8;p=spider.git diff --git a/html/adminmanual-4.html b/html/adminmanual-4.html index d7652b3f..37ff648b 100644 --- a/html/adminmanual-4.html +++ b/html/adminmanual-4.html @@ -2,7 +2,7 @@ - The DXSpider Installation and Administration Manual : Automating things + The DXSpider Administration Manual v1.48: Scripts @@ -13,75 +13,41 @@ Previous Contents
-

4. Automating things

+

4. Scripts

-

Ok, you should now have DXSpider running nicely and allowing connects by cluster -nodes or users. However, it has to be shutdown and restarted manually and if -connection scripts fail they have to be started again manually too, not much use -if you are not at the console! So, in this section we will automate both. -Firstly starting the cluster. +

From 1.48 onwards it will become increasingly possible to control DXSpider's +operation with scripts of various kinds.

-

4.1 Autostarting the cluster -

- -

This is not only a way to start the cluster automatically, it also works as a -watchdog, checking the sanity of DXSpider and respawning it should it crash for -any reason. Before doing the following, shutdown the cluster as you did earlier. -

-

Login as root and bring up the /etc/inittab file in your favourite editor. Add -the following lines to the file near the end ... +

In the first instance, in 1.48, the sysop can create, with their favorite +text editor, files in the directory /spider/scripts which contain +any legal command for a callsign or class of connection which will be executed +at logon.

-

-
-##Start DXSpider on bootup and respawn it should it crash
-DX:3:respawn:/bin/su -c "/usr/bin/perl -w /spider/perl/cluster.pl" sysop >/dev/tty7
-
-
+

+The filename are the callsign of the connection that you want the script to +operate on, eg: /spider/scripts/g1tlh. The filenames are always in +lower case on those architectures where this makes a difference.

-

This line works fine for RedHat and SuSE distributions. The line required for -Slackware distributions is slightly different. My thanks to Aurelio, PA3EZL for -this information. +

In addition to the callsign specific scripts there are three others:-

-DX:23:respawn:/bin/su - sysop -c "/usr/bin/perl -w /spider/perl/cluster.pl" >/dev/tty7
+startup
+user_default
+node_default
 
+

The startup script is executed immediately after all +initialisation of the node is done, but before any connections are +possible.

-

This will automatically start DXSpider on tty7 (ALT-F7) on bootup and restart -it should it crash for any reason. -

-

As root type the command telinit q. DXSpider should start up -immediately. You will see the output on tty7 and if you login as sysop -you should find everything running nicely. -

-

So far so good, now to automate script connections... -

-

4.2 The crontab file -

- -

Login as sysop and create a file in /spider/local_cmd called crontab. -Edit it with your favourite editor and add a line like this (I have included -a comment) -

-

-
-# check every 10 minutes to see if gb7xxx is connected and if not
-# start a connect job going
-
-0,10,20,30,40,50 * * * * start_connect('gb7xxx') if !connected('gb7xxx')
-
-
+

The user_default script is executed for every user that does +NOT already have a specific script.

-

The callsign involved will be the callsign of the cluster node you are -going to connect to. This will now check every 10 minutes to see if -gb7xxx is connected, if it is then nothing will be done. If it is not, -then a connect attempt will be started. +

The node_default script is executed for every node that doesn't +have a specific script.

-

There are probably lots of other things you could use this crontab file for. -If you want to know more about it, look at the -DXSpider website -at the cron page where it is explained more fully. +

There are a couple of examples in the /spider/scripts directory.


Next