epoch1970;429411 Wrote: 
> In this case, lets stick to telnet:> 
Code:
--------------------
  >   > #!/bin/sh -e
  > SERVER=what.ever.local
  > PORT=9090
  > MAC=00:01:02:03:04:05
  > 
  > (/bin/echo "$MAC connect www.squeezenetwork.com"
  > /bin/sleep 1
  > /bin/echo exit) | /usr/bin/telnet $SERVER $PORT > /dev/null 2>&1
  > 
  > exit 0
--------------------
> > 
> Put your MAC and server IP or name in the script. Adjust the paths in
> case telnet lives somewhere else than /usr/bin/
> The "> /dev/null 2>&1" part removes all normal or error output
> including the nagging "Connection closed". I guess your cron job will
> like that. Remove it if you want to see a bit more what happens.

Absolutly brilliant! I've built the script as you describe and it
functions correctly from the command line. Now I have to remind myself
how to get it running from crontab and make it persistant. It's a very
long time since I used UNIX and memory is fading :-) 

Many thanks

Bob


-- 
bobertuk

1 x Duet - SC 7.3.3 - SSOTS v3.17
Lavry DA-10 DAC
QNAP TS-509 3.1.0 b529T
Starfish Pre-amp : Based on NAIM
Heavily modified NAIM NAP 250 Power-amp
Behringer DEQ2496
Linn Isobarik DMS
------------------------------------------------------------------------
bobertuk's Profile: http://forums.slimdevices.com/member.php?userid=30376
View this thread: http://forums.slimdevices.com/showthread.php?t=64121

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to