#!/bin/sh STATUS=$(/sbin/mcetool --status | grep -v grep | grep Cellular | awk '{print $2}' | head -1) if [ $STATUS == "enabled" ] then sed -i 's/OFF/ON/' /home/user/.local/share/applications/toggle_flight.desktop dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"Flightmode ON" string:'' string:"/home/user/.local/share/icons/hicolor/apps/flightON.png" uint32:0 /sbin/mcetool --disable-radio=cellular else sed -i 's/ON/OFF/' /home/user/.local/share/applications/toggle_flight.desktop dbus-send --print-reply --dest=com.meego.core.MNotificationManager /notificationmanager com.meego.core.MNotificationManager.addNotification uint32:0 uint32:0 string:'device' string:'' string:"Flightmode OFF" string:'' string:"/home/user/.local/share/icons/hicolor/apps/flightOFF.png" uint32:0 /sbin/mcetool --enable-radio=cellular fi