Hirdetés
-
GAMEPOD.hu
Általános információk/segédletek Suste-HeadLess OpenWRT-hez
Új hozzászólás Aktív témák
-
Gem Geza
csendes tag
Ja-ja ezek azok
#!/bin/sh
[ "$SEEN" = "" ] && SEEN=0
led=`find "/sys/class/leds" -iname "*:system"`
if [ "$ACTION" = "pressed" ];then
echo "timer">"$led/trigger"
echo "150">"$led/delay_on"
echo "850">"$led/delay_off"
exit 0
fi
if [ "$ACTION" = "released" ];then
echo "none">"$led/trigger"
echo "1">"$led/brightness"
fi
SSID_OFF_exclude=""
SSID_ON_exclude=""
[ "$SSID_OFF_exclude" = "" ] && SSID_OFF_exclude='~°'
[ "$SSID_ON_exclude" = "" ] && SSID_ON_exclude='~°'
if [ "`echo $BUTTON | egrep 'wps|reset' `" != "" ] || [ "`echo $1 | egrep -w 'on|off'`" != "" ];then
if [ "$SEEN" -lt "5" ];then
SW=`cat /etc/config/wireless |tr -d '\n' | sed "s/config wifi/\n&/g" | egrep -vwi "wifi-device|$SSID_OFF_exclude|disabled|^$"`
[ "$1" = "off" ] && [ "$SW" = "" ] && SW=a
[ "$1" = "on" ] && [ "$SW" != "" ] && SW=""
if [ "$SW" = "" ];then
$(logger "WIFI Enabled")
c2e=`cat /etc/config/wireless | tr -d '\n' | sed "s/config wifi/\n&/g" | egrep -vwi "$SSID_ON_exclude" | sed "s/\t/\n\t/g" | grep -v 'disabled'`
c2d=`cat /etc/config/wireless | tr -d '\n' | sed "s/config wifi/\n&/g" | egrep -wi "$SSID_ON_exclude" | sed "s/\t/\n\t/g"`
echo -e "$c2e\n$c2d">/etc/config/wireless
else
[ "$SW" = "a" ] && SW=""
$(logger "WIFI Disabled")
c2d=`echo "$SW" | sed "s/.*[a-z].*/&\toption disabled '1'/;s/\t/\n\t/g"`
c2e=`cat /etc/config/wireless |tr -d '\n' | sed "s/config wifi/\n&/g" | egrep -wi "wifi-device|$SSID_OFF_exclude|disabled" | sed "s/\t/\n\t/g"`
echo -e "$c2e\n$c2d">/etc/config/wireless
fi
wifi
elif [ "$SEEN" -ge "10" ];then
mtd -r erase rootfs_data
reboot
else
extroot=`mount | grep 'sd..' | egrep -i ' /overlay | / ' | egrep -o sd.`
killall minidlna
/etc/init.d/transmission stop
/etc/init.d/vsftpd stop
/etc/init.d/samba stop
for i in `mount | egrep -o "/dev/sd.." | grep -v "$extroot"`;do umount $i;done
for i in `egrep -o "/dev/sd.." /proc/swaps | grep -v "$extroot"`;do swapoff $i 2>&1;done
fi
fi
Új hozzászólás Aktív témák
- Latitude 5540 15.6" FHD IPS i5-1345U 16GB 256GB NVMe magyar vbill ujjolv IR kam gar
- P71 17.3" FHD IPS i7-7820HQ Quadro P4000 16GB 512GB NVMe ujjlolv DVD író gar
- Megkímélt S20 ultra 5G, 128 GB space grey, eladó
- Sony Bravia 4K UHD KD-49XD7005 (Képhibás a kék dominál.)
- Legion 5 15ACH6H 15.6" FHD IPS Ryzen 7 5800H RTX 3060 16GB 512GB NVMe magyar vbill gar
Állásajánlatok
Cég: Ozeki Kft
Város: Debrecen
Cég: Ozeki Kft
Város: Debrecen