[Dxspider-support] RE: Dxspider-support Digest, Vol 31, Issue 3

Han Sytsma middenveld at tip.nl
Sat Aug 6 00:28:19 BST 2005


Hi Keith,


   ||
   ||1 You say the file below is a script so it is saves as a *.PM file?
   ||
No, it does not matter it is just a shell script, I called it telnet.http
and made it executable with chmod +x 

   ||2 spawn /spider/src/client dx1htt telnet &
   ||set client $spawn_id
   ||
   ||I think this means that you a telnet session and login 
   ||with the call
   ||dx1htt
Yes, it is a connection simular to the first sysop connection, but I tell
spider to act as a telnet session. the callsign is DX1HTT but can be
anything (it is not transmitting data into the cluster)

   ||
   ||3 what directory dose this file live in is it spider/src?
I have it in /usr/local/dxconnect, but it can be anywhere on the system

Some tips:
Verify the path names in the script around > and >> it can be usefull to
create empty files first

check if the main components of the script exist:

a. "root at compaq:~# expect" gives something like 
expect1.1>

b. "root at compaq:~# head -n 25 /var/log/messages" should return the first 25
lines of the messages logfile

c. check read and write permissions on the place you want to write: echo
"check" > /<path>/filename.txt should be able to create a file (under the
username you intend to use for the script, I just simple use root)


starting the script:

I do start it in /etc/inittab. The reason is that when something goes wrong
it restarts the script automaticly. Test the script first before you put it
there, a typo might bring it into a loop and you have a lot of problems to
regain control over your machine.

7:2345:respawn:/bin/su root -c "cd /usr/local/dxconnect/; ./telnet.http
>/dev/tty7 2>&1 </dev/tty7"

su root means it runs as user root, you might want to change it to user
apache.
-c invokes the part between the semi collon, change directory to
/usr/local/dxconnect en run ./telnet.http
>part< is taking care of presenting a viaual output to the screen at virtual
screen tty7 (alt f7)


If you have problems try parts of the script like "exec echo "example" >
/var/www/html/path/file.txt first by placing # before the other lines, I am
not for sure but it is possible that you need to install another part of the
expect package to get the exec command to work (depends on distribution and
what you installed)

I hope this helpes you and Kees to get the script running, it is working
here under RedHat 7.0.


73 Han, PE1FAM


   ||
   ||#!/usr/bin/expect -f
   ||#
   ||# connect naar DXCluster en send unproto info naar bestand
   ||#
   ||#
   ||expect "\n"
   ||
   ||spawn /spider/src/client dx1htt telnet &
   ||set client $spawn_id
   ||
   ||#
   ||while 1 {
   ||    	expect "DX de*"  { 
   ||	      exec head -n 99 /var/www/html/halerbrug/dx/dx.txt >
   ||/tmp/dx.rst
   ||	      exec echo -n "$expect_out(0,string)" > /tmp/dx.tmp
   ||	      exec cat /tmp/dx.tmp /tmp/dx.rst >
   ||/var/www/html/halerbrug/dx/dx.txt
   ||	}
   ||	expect "To ALL*"  {
   ||	      exec head -n 24 /var/www/html/halerbrug/dx/ann.txt >
   ||/tmp/ann.rst
   ||	      exec echo -n "$expect_out(0,string)" > /tmp/ann.tmp
   ||	      exec cat /tmp/ann.tmp /tmp/ann.rst >
   ||/var/www/html/halerbrug/dx/ann.txt
   ||	}
   ||	expect "WCY de*"  {
   ||	      exec head -n 24 /var/www/html/halerbrug/dx/wcy.txt >
   ||/tmp/wcy.rst
   ||	      exec echo -n "$expect_out(0,string)" > /tmp/wcy.tmp
   ||	      exec cat /tmp/wcy.tmp /tmp/wcy.rst >
   ||/var/www/html/halerbrug/dx/wcy.txt
   ||	}
   ||	expect "WWV de*"  {
   ||	      exec head -n 24 /var/www/html/halerbrug/dx/wcy.txt >
   ||/tmp/wcy.rst
   ||	      exec echo -n "$expect_out(0,string)" > /tmp/wcy.tmp
   ||	      exec cat /tmp/wcy.tmp /tmp/wcy.rst >
   ||/var/www/html/halerbrug/dx/wcy.txt
   ||	}
   ||}
   ||#	
   ||# eof telnet.http 
   ||
   ||   ||-----Oorspronkelijk bericht-----
   ||   ||Van: dxspider-support-bounces at dxcluster.org 
   ||   ||[mailto:dxspider-support-bounces at dxcluster.org] Namens 
   ||   ||dxspider-support-request at dxcluster.org
   ||   ||Verzonden: donderdag 4 augustus 2005 13:00
   ||   ||Aan: dxspider-support at dxcluster.org
   ||   ||Onderwerp: Dxspider-support Digest, Vol 31, Issue 3
   ||   ||
   ||   ||
   ||   ||Send Dxspider-support mailing list submissions to
   ||   ||	dxspider-support at dxcluster.org
   ||   ||
   ||   ||To subscribe or unsubscribe via the World Wide Web, visit
   ||   ||	http://www.tobit.co.uk/mailman/listinfo/dxspider-support
   ||   ||or, via email, send a message with subject or body 'help' to
   ||   ||	dxspider-support-request at dxcluster.org
   ||   ||
   ||   ||You can reach the person managing the list at
   ||   ||	dxspider-support-owner at dxcluster.org
   ||   ||
   ||   ||When replying, please edit your Subject line so it is 
   ||more specific
   ||   ||than "Re: Contents of Dxspider-support digest..."
   ||   ||
   ||   ||
   ||   ||Today's Topics:
   ||   ||
   ||   ||   1. Dx Spots in web pages (Keith Le Boutillier)
   ||   ||
   ||   ||
   ||   ||-----------------------------------------------------------
   ||   ||-----------
   ||   ||
   ||   ||Message: 1
   ||   ||Date: Wed, 3 Aug 2005 21:53:48 -0000
   ||   ||From: "Keith Le Boutillier" <gu6efb at cwgsy.net>
   ||   ||Subject: [Dxspider-support] Dx Spots in web pages
   ||   ||To: "The DXSpider Support list" 
   ||<dxspider-support at dxcluster.org>
   ||   ||Message-ID: <000d01c59875$d4850490$0201a8c0 at RadioPC>
   ||   ||Content-Type: text/plain; charset=US-ASCII
   ||   ||
   ||   ||
   ||   ||VU3SPQ / Sunny wrote 
   ||   ||
   ||   ||I have a working dxcluster now. www.dxcluster.in. I 
   ||would like to
   ||   ||provide the dx spots on my website directly. Can anyone 
   ||   ||please let me
   ||   ||know or help me with the required scripts etc., that would 
   ||   ||enable me to
   ||   ||do this. 
   ||   ||
   ||   ||I would prefer to do my webpages in asp or html.
   ||   ||
   ||   ||This is something that I would like to also achieve. 
   ||   ||Eric at GB7CGL has this function on his web site but I 
   ||   ||don't know if
   ||   ||this information comes from his DXspider cluster or the AR 
   ||   ||cluster that
   ||   ||he also runs.
   ||   ||
   ||   ||Do any sysops have any scripts that work with spider they 
   ||   ||would like to
   ||   ||share.
   ||   ||
   ||   ||
   ||   ||73 Keith GU6EFB MU3EFB
   ||   ||
   ||   ||Sysop GB7DXG Dxcluster Telnet Access Web 
   ||   ||gb7dxg.shacknet.nu Port 7300
   ||   ||Web Site http://gb7dxg.shacknet.nu
   ||   ||Echolink Node GU6EFB-L Node number 121749
   ||   ||Web Site http://gu6efb.shacknet.nu
   ||   ||E-Mail gu6efb at cwgsy.net
   ||   ||
   ||   ||
   ||   ||
   ||   ||
   ||   ||
   ||   ||-- 
   ||   ||No virus found in this outgoing message.
   ||   ||Checked by AVG Anti-Virus.
   ||   ||Version: 7.0.338 / Virus Database: 267.9.9/62 - Release 
   ||   ||Date: 02/08/2005
   ||   ||
   ||   ||
   ||   ||
   ||   ||
   ||   ||------------------------------
   ||   ||
   ||   ||_______________________________________________
   ||   ||Dxspider-support mailing list
   ||   ||Dxspider-support at dxcluster.org
   ||   ||http://www.tobit.co.uk/mailman/listinfo/dxspider-support
   ||   ||
   ||   ||
   ||   ||End of Dxspider-support Digest, Vol 31, Issue 3
   ||   ||***********************************************
   ||   ||
   ||
   ||
   ||_______________________________________________
   ||Dxspider-support mailing list
   ||Dxspider-support at dxcluster.org
   ||http://www.tobit.co.uk/mailman/listinfo/dxspider-support
   ||
   ||
   ||
   ||-- 
   ||No virus found in this incoming message.
   ||Checked by AVG Anti-Virus.
   ||Version: 7.0.338 / Virus Database: 267.10.0/63 - Release Date:
   ||03/08/2005
   ||
   ||
   ||
   ||-- 
   ||No virus found in this outgoing message.
   ||Checked by AVG Anti-Virus.
   ||Version: 7.0.338 / Virus Database: 267.10.0/63 - Release 
   ||Date: 03/08/2005
   ||




More information about the Dxspider-support mailing list