I am using the gsettings tool to set up system proxy automatically[System Settings-> Network proxy], SO i made a simple bash script with these lines:
gsettings set org.gnome.system.proxy mode 'auto'
//for another mode
gsettings set org.gnome.system.proxy mode 'none'
I place this script in /etc/network/if-up.d because I want the script to run when my laptop connects to the internet. I saved a copy of the script in my home folder and when i run the copy, the script seems to work fine and i can see the changes in network proxy window however when i run the script in /etc/network/if-up.d folder, the settings don't seem to be applied for some reason. What am i missing here?