#!/bin/sh # Company: PowerCraft Technology # Author: Copyright Jelle de Jong # Note: Please send me an email if you enhanced the script # Version: 0.0.2 # Date: 2008-12-12 / 2009-03-31 # System: Ubuntu/Debian GNU/Linux # Description: Closing HSDPA USB Huawei E220/E156G/E180 monitoring # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more de/usr/bin/tails. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. # set -x # exec 2>/var/log/pct-mobile-internet-disable.log # under testing echo "$(date +%s) $(/sbin/ifconfig ppp0 | grep 'RX bytes.*TX bytes' | sed -e 's/:/ /g' | awk '{ print $3, $8; }')" | sudo tee -a /var/lib/pct-mobile-internet/pct-mobile-internet-usage.log /etc/init.d/networking stop && sleep 1 [ -e /etc/network/interfaces.huawei.backup ] && mv --verbose /etc/network/interfaces.huawei.backup /etc/network/interfaces /etc/init.d/networking start exit