User:Pepsimax2k

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 05:31, 8 October 2007 (edit)
Wildblue (Talk | contribs)
(heartbeat)
← Previous diff
Revision as of 10:58, 20 October 2007 (edit) (undo)
Pepsimax2k (Talk | contribs)

Next diff →
Line 1: Line 1:
-hello there.+Random bash code...
-i moved the section you created to http://www.dd-wrt.com/wiki/index.php/Talk:LaFonera_Software_Heartbeat-dev+
-, also added some words.+
-just make the changes you think about on the -dev site and i will update the official version as soon as possible. +==Telnet to router from router, save output to file, grep file for term==
-do you prefer your name be added in the official development-notes? else i will add "developed in the wiki of dd-wrt"+sh /tmp/yourscript | tee /tmp/ipinfo
 + 
 +#!/bin/sh
 +myuser=root
 +mypass=password
 +myhost="192.168.1.2 23"
 +mycmd="uptime"
 +(echo -e "$myuser\r"; sleep 1; echo -e "$mypass\r"; sleep 1; sleep 1; echo -e "$mycmd\r"; sleep 5; ) | telnet $myhost
 +echo -e "exit\r"
 + 
 +if [ "`cat ipinfo | grep " 12 days"`" != "" ]; then echo "woohoo"; fi;

Revision as of 10:58, 20 October 2007

Random bash code...

Telnet to router from router, save output to file, grep file for term

sh /tmp/yourscript | tee /tmp/ipinfo

  1. !/bin/sh

myuser=root mypass=password myhost="192.168.1.2 23" mycmd="uptime" (echo -e "$myuser\r"; sleep 1; echo -e "$mypass\r"; sleep 1; sleep 1; echo -e "$mycmd\r"; sleep 5; ) | telnet $myhost echo -e "exit\r"

if [ "`cat ipinfo | grep " 12 days"`" != "" ]; then echo "woohoo"; fi;