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.


-- 
epoch1970
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
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