|
2012-02-12
, 04:40
|
Posts: 49 |
Thanked: 37 times |
Joined on Jan 2012
|
#3
|
|
2012-02-13
, 08:53
|
Posts: 49 |
Thanked: 37 times |
Joined on Jan 2012
|
#4
|
nano conn.sh
#!/bin/sh #check if icd2 is running var="`ps aux |grep icd2 |awk '{print substr($5,6)}'`" var1="sbin/icd2" if [ $var == $var1 ]; then #stop the manager and send a notification sudo /etc/init.d/icd2 stop run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Network Manager Off" else #start manager and run the network dialog sudo /etc/init.d/icd2 start sleep 2 run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false fi
chmod +x conn.sh
user ALL = NOPASSWD: /etc/init.d/icd2 stop user ALL = NOPASSWD: /etc/init.d/icd2 start
~/conn.sh
The Following User Says Thank You to devian For This Useful Post: | ||
Thanx in advance
Last edited by devian; 2012-02-13 at 18:33. Reason: solved