Active Topics

 


Reply
Thread Tools
Posts: 35 | Thanked: 13 times | Joined on Oct 2008
#1
Ive been wanting to run a few commands each time I enter / leave my home WIFI.

I use my N800 as a pocket server for various apps. For security I would like to automatically start/stop daemons when in or out of home.

Ive already written start/stop scripts (placed under osso-statusbar-cpu) for ease but would like to automate this. Been looking at dbus-monitor but thats where ive hit my technical wall of the device.

Any suggestions how a command could be run when a known WIFI becomes active / deactivated?


Cheers
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
http://maemo.org/downloads/product/OS2008/conler/

Or you could try Matan's dbus-scripts-settings which is in Extras I believe.
 

The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#3
dbus-scripts does that (available on extras repository). Just install this package, find the id of your network by looking at the output of

gconf -R /system/osso/connectivity/IAP

and create a file in /etc/dbus-scripts.d/ containing the lines:
/connectscript * * com.nokia.icd * network_id * CONNECTED
/disconnectscript * * com.nokia.icd * network_id * IDLE

(replacing network_id with the correct id and /connectscript with correct path of the script you want to run on connect.)


In extras-devel there is a package called dbus-scripts-settings which allows doing these things using a GUI.
 

The Following 3 Users Say Thank You to Matan For This Useful Post:
Posts: 12 | Thanked: 10 times | Joined on Jan 2008 @ Patra, Greece
#4
There is also the old fashioned way by using just shell scripts.

Check here: http://www.internettablettalk.com/fo...832#post259832
 

The Following 3 Users Say Thank You to spiros For This Useful Post:
Posts: 35 | Thanked: 13 times | Joined on Oct 2008
#5
I didnt expect this many options to toy with. Thanks for the replies, will take a look tonight and update tomorrow.
 
Posts: 35 | Thanked: 13 times | Joined on Oct 2008
#6
conler .... for some reason didnt install, stuck on the prepare screen.

dbus-scripts .... installed because it looks helpful

manual method .... Thanks spiros this was the method I went for. All the scripts ive written fit very well with /etc/network. Cheers for the link and script snippet. For my needs ive posted my simple edit to exec all scripts within dir.

Code:
#!/bin/ksh
ssid=`iwgetid -s`

if [ $ssid == "my_network_ssid" ]
then
cd /home/user/MyDocs/scripts
list=`ls *.sh`
for script in $list
do
   $script
done
__________________
topsmileys - Free forum smileys

Last edited by purg; 2009-04-09 at 08:16.
 
Posts: 1,213 | Thanked: 356 times | Joined on Jan 2008 @ California and Virginia
#7
Conler + Wake on Lan + x10 = cool....
__________________
----------------------------------------------------

www.ezschool.com - The best online educational experience.
 
Reply

Tags
active, automated, connection, home, wifi


 
Forum Jump


All times are GMT. The time now is 15:19.