so ich hab mal was recht simples mit
festival gebastelt.
das läuft dann als cronjob jede stunde und sorgt für erschrockene gesichter.
ist natürlich noch weit ausbaufähig.
mein plan ist es beim anruf aufs modem mittels festival was im voicemode aufm modem abzuspielen so daß mans am telefon quasi abhören kann...
weiterhin wär es denkbar mittels nutzererkennung (handy-bluetooth oder so) einen angepassten Text rauszublubbern der zb über emails etc informiert wenn man die wohnung betritt.
CODE
#!/bin/bash
clear
echo "Ares selftest routine"
echo "Copyright 2009 Stefan Kauerauf"
echo "Setting Variables"
error=0
warning=0
ok=0
datafile='/tmp/sysinfo.dat'
voicefile='/tmp/sysinfo.voice'
#networkinterface='eth1'
pingpartner='google.de'
ipgetteraddress='http://ip.kos.li'
networkinterface=$1
if [ -f $datafile ]
then
rm $datafile
echo "Datafile found, deleted"
else
echo "No datafile found"
fi
if [ -f $voicefile ]
then
rm $voicefile
echo "Voicefile found, deleted"
else
echo "No voicefile found"
fi
echo "Collecting Information"
ddate=`date +%d.%m.%y`
dtime=`date +%H:%M:%S`
hostname=`hostname`
externalip=`wget -O - -q $ipgetteraddress`
internalip=`ifconfig $networkinterface | head -n 2 | tail -n 1 | cut -d: -f2 | cut -d" " -f 1`
pingtime=`ping -c 4 $pingpartner | grep '.* = .*/.*/.*/.*'|cut -d/ -f5`
macaddress=`ifconfig $networkinterface| head -n 1 | tail -n 1 | cut -d" " -f12`
echo "This is the automatic selfchecking routine of ares." >> $datafile
echo "Its is the: $ddate $dtime" >> $datafile
echo "The lan I P address is: $internalip." >> $datafile
echo "The external I P address is: $externalip." >> $datafile
echo "The average ping-time on google.de is: $pingtime." >> $datafile
echo "The hardware address of $networkinterface is: $macaddress" >> $datafile
cat $datafile
cat $datafile | text2wave > $voicefile
aplay $voicefile