#!/bin/sh # Toggle WLAN radio state STATUS=$(/sbin/mcetool --status | grep -v grep | grep WLAN | awk '{print $2}' | head -1) if [ $STATUS == "enabled" ] then sed -i 'On/Off/' /home/user/.local/share/applications/netToggle.desktop `/sbin/mcetool --disable-radio=wlan` else dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"WLAN On" string:'' string:'' uint32:0 `/sbin/mcetool --enable-radio=wlan` fi