Last active
December 19, 2017 19:49
-
-
Save pascencio/5e30b4a2201709b7d42b33f86c60b64a to your computer and use it in GitHub Desktop.
Proxy Management on Manjaro Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ID=$(id -u) | |
PROXYON="${http_proxy}" | |
if [ ${ID} != 0 ] ; | |
then | |
echo "Debes ejecutar este comando como root" | |
else | |
if [ "${PROXYON}X" != "X" ] ; | |
then | |
sed -i "s/\(.*\)\(PROXY\|proxy\)\(=\)/#\1\2\3/" /etc/environment | |
echo "Proxy desactivado" | |
else | |
echo "El Proxy no ha sido activado" | |
fi | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ID=$(id -u) | |
PROXYON="${http_proxy}" | |
if [ ${ID} != 0 ] ; | |
then | |
echo "Debes ejecutar este comando como root" | |
else | |
if [ "${PROXYON}X" != "X" ] ; | |
then | |
echo "El Proxy ya ha sido activado" | |
else | |
sed -i "s/\(#\)\(.*\)\(PROXY\|proxy\)\(=\)/\2\3\4/" /etc/environment | |
echo "Proxy activado" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use Manjaro Linux with XFCE 4 and these script are useful when you must change between environments with or without Proxy Server.
I hope that for you works too!