echo '#!/bin/sh
variable=$(/usr/sbin/iwconfig ath0 | grep Quality)
quality=${variable:23:2}
if [ "0/" == "$quality" ]
then
ifconfig ath0 down
echo "wlan ausgeschaltet" >> /tmp/wlanchecklog.txt
else
echo "client connected" >> /tmp/wlanchecklog.txt
fi' >> /tmp/root/wlan_off.sh
echo '#/bin/sh
ifconfig ath0 up
echo "wlan angeschaltet" >> /tmp/wlanchecklog.txt' >> /tmp/root/wlan_on.sh
30 1-4 * * * root /tmp/root/wlan_off.sh' > /tmp/cron.d/wlanoff
31 5 * * * root /tmp/root/wlan_on.sh' > /tmp/cron.d/wlanon
erstellt am 20.01.2012 um 22:09:32 von Alexander Rausch
Bitte nutze das folgende Formular um ein Kommentar zu schreiben.
Zum Formatieren kann BB-Code
genutzt werden.