I got fed up of having to switch proxy settings on and off between sites, so I wrote this little script to help me!
There are a few configuration steps to go through first:
- Go into Control Center and set Network Proxy to use the system proxy settings.
- Go into Yast and set your proxy settings to on.
- cp /etc/sysconfig/proxy /etc/sysconfig/proxy.on
- Go into Yast and set your proxy settings to off.
- cp /etc/sysconfig/proxy /etc/sysconfig/proxy.off
- Set Firefox to use system settings for proxy
- Put this script somewhere and make it executable:
# Replace the IP address below with the address of your proxy server.
ping 172.16.1.1 -c 1 -s 32
if [ $? = 0 ]
# If I can ping my proxy server then use it!
sudo cp /etc/sysconfig/proxy.on /etc/sysconfig/proxy
# If I can't ping my proxy server then switch off!
sudo cp /etc/sysconfig/proxy.off /etc/sysconfig/proxy
- Call this script at startup - I execute it from my .profile script.
NB: you will need to add the executing user your SUDOers list to run without a password for this script to work - you could alternatively change the permissions on the /etc/sysconfig/proxy file to avoid this.
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.