Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Help With Bash Script, automatic setting the proxyserver
post Mar 1 2004, 07:09 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 4
Joined: 1-March 04
Member No.: 2,500


I use my laptop at home and at school. But the school use a proxyserver so I have to set it up the first time I use mozilla and each time I open a terminal window.

I figured this could be automated because the DNS is detected at startup and saved in /etc/resolv.conf.

So I tried writing a script something like this:

DNS=grep -a stud /etc/resolv #If at school the string is 'search'

DNS_WITH_PROXY="search" #the DNS which requires a proxy

then export http_proxy #sets the proxyserver.

Well.. my problem is the condition in the if/then. How can I compare two values of variables and if equal -> then...?

Sorry.. I don't yet understand the way the script language works. I've looked in the tutorials without luck. Hope someone can help me out. Maybe even an easier way to solve the problem;-)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 19th March 2018 - 06:01 AM