#!/bin/sh ### # # FreeWLAN Addons - http://www.freewlan.info # # 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 2 # 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 details. # # 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 # # http://www.gnu.org/copyleft/gpl.html # ### ( sleep 10 ntpclient -s -h pool.ntp.org . /etc/functions.sh . /tmp/network-config config_load mailservice config_get rebootcheck mail rebootcheck config_get to mail to config_load fon config_get essid public essid if enabled $rebootcheck;then MAIL_TO="$to"; macaddress=`ifconfig eth0 |grep HWaddr|awk {'print $5'}`; datestr=`date +%A", at "%R" (UTC) ("%F")"` echo -e " The device with MAC address $macaddress was restarted on $datestr. DATE $(date) ESSID $essid Hostname `cat /etc/hostname` Status URL http://$(ifconfig $wan_ifname 2>/dev/null | grep inet | awk -F'[: ]+' '{print $4}')/cgi-bin/webif/status.sh " |mail "Fonera: (`cat /etc/hostname`) RebootCheck" "$MAIL_TO" fi ) &