Register
It is currently Thu Oct 23, 2014 12:32 pm

Startup script for laptop, if plugged... if i am at home ...


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Wed Apr 08, 2009 1:41 am   

Joined: Wed Apr 08, 2009 1:32 am
Posts: 2
### this script works correctly on mandriva 2009 ###

if /sbin/iwconfig | grep -i 'ESSID:"WLAN_11"'; then ### if i am at home
if ping www.google.es -c 1 | grep -i '1 received'; then
if ping 192.168.1.34 -c 1 | grep -i '1 received'; then ###ping my destop computer
zenity --info --text="Desktop está conectado" ###my desktop computer is running (it's normal having a slow connection)
elif grep "on-line" /proc/acpi/ac_adapter/AC0/state -c; then ### if laptop is plugged
#transmission -m
#azureus
azureus & deluge
#deluge
#amule
#monsoon
fi
elif ping 192.168.1.1 -c 1 | grep -i '1 received'; then ### if my router is up
zenity --info --text="El zyxel no está conectado a internet" ### my router is up but not connected to the internet (needs to restart)
fi
fi


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP