Directory revision date: 2015/09/16 22:34:40 CEST. |
[ Show/Download this file as plain text ]
#!/bin/sh # # plugin pour camlgrenouille et le modem/routeur du FAI : Nerim # Testé pour : # Type de système: SpeedStream 5200-Série # Config. n°: 003-7080-406 # Micrologiciel n°: 004-E240-A29 # # créé par PixEye <pixeye@pixeye.net> le 21/11/2004. # # Pour + d'infos : # http://forums.grenouille.com/index.php?showtopic=27841 # http://camlgrenouille.grenouille.com/ # http://www.grenouille.com/ ipRouteur="192.168.254.254" #ipRouteur="localhost" ########## <<< Décommenter POUR TESTS ########## if [ "$#" -gt 1 -o "$1" = "-h" -o "$1" = "--help" ] ; then cmd=`basename $0` echo "Usage : $cmd [<interface_réseau>]" echo "Lire le fichier $0 pour + d'infos." exit 1 fi # Récupère l'interface réseau : if [ "$#" -eq 1 ] ; then if="$1" ; else if="eth0" ; fi # Récupère le nombre d'octets émis et reçus : tmpFile="/tmp/lastStats.tmp" w3m -dump http://$ipRouteur/atmstatsx.htm > "$tmpFile" ligneOut=`grep Ém "$tmpFile"|sed 's/|//g'` set 1 $ligneOut ; out="$5" ligneIn=`grep Réc "$tmpFile"|sed 's/|//g'` set 1 $ligneIn ; in="$5" rm -f "$tmpFile" # Récupère l'IP publique : ligneIP=`w3m -dump http://$ipRouteur/summary.htm|grep -i pppo` set 1 $ligneIP;ip="$5" if [ -z "$ip" ] ; then echo "Erreur : échec de la lecture de l'IP publique !" echo "\$* = \"$*\"" exit 3 fi # Affiche le résultat : echo "$if $ip $in $out"
nerim.sh (1320B) |
script_demarrage.sh (2731B) |
shell_ifconfig.sh (1055B) |
WFV revision date: 2015/09/16 22:34:40 CEST. |