X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=html%2Fadminmanual-4.html;h=48e5702a0d5f5567ffe489adbbb9908391a59be7;hb=5e145358734eabf8855fb2b4c1daabcc55bd9da0;hp=d7652b3f4c018fd6a63b14c78c172da93847688a;hpb=e674587476599456cce169e02b0e441d985f9dd8;p=spider.git diff --git a/html/adminmanual-4.html b/html/adminmanual-4.html index d7652b3f..48e5702a 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.47: Other filters @@ -13,75 +13,118 @@ Previous Contents
-

4. Automating things

+

4. Other filters

-

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. -

-

4.1 Autostarting the cluster +

4.1 Filtering Mail

-

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 /spider/msg directory you will find a file called badmsg.pl.issue. Rename +this to badmsg.pl and edit the file. The original looks something like this ....

-##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 list of regexes for messages that we won't store having
+# received them (bear in mind that we must receive them fully before
+# we can bin them)
+
+
+# The format of each line is as follows
+
+#     type      source             pattern 
+#     P/B/F     T/F/O/S            regex  
+
+# type: P - private, B - bulletin (msg), F - file (ak1a bull)
+# source: T - to field, F - from field,  O - origin, S - subject 
+# pattern: a perl regex on the field requested
+
+# Currently only type B and P msgs are affected by this code.
+# 
+# The list is read from the top down, the first pattern that matches
+# causes the action to be taken.
+
+# The pattern can be undef or 0 in which case it will always be selected
+# for the action specified
+
+
+
+package DXMsg;
+
+@badmsg = (
+'B',    'T',    'SALE', 
+'B',    'T',    'WANTED',
+'B',    'S',    'WANTED',
+'B',    'S',    'SALE', 
+'B',    'S',    'WTB',
+'B',    'S',    'WTS',
+'B',    'T',    'FS',
+);
 

-

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. +

I think this is fairly self explanatory. It is simply a list of subject +headers that we do not want to pass on to either the users of the cluster or +the other cluster nodes that we are linked to. This is usually because of +rules and regulations pertaining to items for sale etc in a particular country. +

+

4.2 Filtering DX callouts (Depricated) +

+ +

From version 1.47, this method is replaced by the command set/baddx +

+

In the same way as mail, there are some types of spot we do not wish to pass on +to users or linked cluster nodes. In the /spider/data directory you will find +a file called baddx.pl.issue. Rename this to baddx.pl and edit the file. The +original looks like this ....

-DX:23:respawn:/bin/su - sysop -c "/usr/bin/perl -w /spider/perl/cluster.pl" >/dev/tty7
+
+# the list of dx spot addresses that we don't store and don't pass on
+
+
+package DXProt;
+
+@baddx = qw 
+
+ FROG 
+ SALE
+ FORSALE
+ WANTED
+ P1RATE
+ PIRATE
+ TEST
+ DXTEST
+ NIL
+ NOCALL 
+);
 

-

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

Again, this is simply a list of names we do not want to see in the spotted +field of a DX callout.

-

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 +

4.3 Filtering words from text fields in Announce, Talk and DX spots

-

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) +

Create a file in /spider/data called badwords. The format is quite +simple. Lines beginning with # are ignored so comments can be added. An +example file is below ...

-# 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')
+# Below is a list of words we do not wish to see on the cluster
+grunge grunged grunging
+splodge splodger splodging
+grince
+fluffle
 
+

Multiple words can be used on the same line as shown. Obviously these +are just examples :-)

-

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. -

-

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. +

You can reload the file from the cluster prompt as sysop with load/badwords.


Next