<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<font face="Helvetica, Arial, sans-serif">E poi dicono che il gruppo
software non esiste-non funziona...<br>
Queste sono cose degne da wiki :)<br>
Grande grazie<br>
</font><br>
Il 12/04/2013 11:29, Alessandro (aka ArkaNet) ha scritto:
<blockquote
cite="mid:CABdOjdoOJ16ttzh7jGQimhhzBktByfts+gShD67ZP7zuhLGwkw@mail.gmail.com"
type="cite">
<div>Capita spesso a chi possiede una semplice linea adsl con IP
dinamico</div>
<div>di vedere il proprio IP cambiare frequentemente</div>
<div>ecco un semplice script per tenerne traccia</div>
<div><br>
</div>
<div>-----------------------------------------------------------[CUT
ME]-----------------------------------------------------------</div>
<div><br>
</div>
<div>#!/bin/bash</div>
<div>#</div>
<div># EASY IP LOGGER</div>
<div>#</div>
<div>mkdir /var/log/IP_CHECK</div>
<div>touch /var/log/IP_CHECK/ip.log</div>
<div>DIR="/var/log/IP_CHECK/ip.log"</div>
<div><br>
</div>
<div>while true; do</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>echo
-e "\n#################### [$(date +"\033[01;32m%F\033[00m
\033[01;31m%T\033[00m")] ######################" >> $DIR</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>test_ping=$(ping
-c 3 <a moz-do-not-send="true" href="http://www.google.com">www.google.com</a>
| while read pong; do echo -e "[$(date +"\033[01;32m%F\033[00m
\033[01;31m%T\033[00m")] ${pong}"; done)</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>test_ip=$(curl
-s <a moz-do-not-send="true" href="http://checkip.dyndns.com">checkip.dyndns.com</a>
| awk ' BEGIN { FS = ": " } ; {print $2} ' | cut -d '<' -f1 |
while read ip; do echo -e "[$(date +"\033[01;32m%F\033[00m
\033[01;31m%T\033[00m")] ${ip}"; done)</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>echo
-e "${test_ping}\n" >> $DIR</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>echo
"${test_ip}" >> $DIR</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>echo
-e
"#################################################################\n"
>> $DIR</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>sleep
60</div>
<div>done</div>
<div>exit 0</div>
<div><br>
</div>
<div>-----------------------------------------------------------[CUT
ME]-----------------------------------------------------------</div>
<div><br>
</div>
<div><br>
</div>
-- <br>
<pre cols="72"><span style="background-color: rgb(255, 255, 255); white-space: normal;"><font face="'comic sans ms', sans-serif"><pre cols="72"><i>Arka
</i></pre></font></span></pre>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Not-wireless mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Not-wireless@ml.ninux.org">Not-wireless@ml.ninux.org</a>
<a class="moz-txt-link-freetext" href="http://ml.ninux.org/mailman/listinfo/not-wireless">http://ml.ninux.org/mailman/listinfo/not-wireless</a>
</pre>
</blockquote>
</body>
</html>