/etc/default/openvpn AUTOSTART= issue
Posted: Mon Apr 13, 2020 7:18 am
Greetings,
the situation:
I would like to choose the server to connect to by choosing the AUTOSTART= in the /etc/default/openvpn flie.
There are variables and values to do so:
#
#AUTOSTART="all"
#AUTOSTART="none"
AUTOSTART="Netherlnds"
this AUTOSTART="<value of my choice>" is modified by a script that changes the country where to connect to (I use PIA commercial vpn provider).
So, I have a number of .conf files that are correctly set (checked and double checked. they all work if picked manually). Say: Netherlands.conf, uk.conf and US.conf.
I need one at the time when ever is the need of a change, and I do that by running a script.
The script DOES change the AUTOSTART= (I checked that too).
I, of course, also restarted the service:
sudo systemctl daemon-reload
sudo systemctl restart openvpn@Netherlands.service
The issue:
Even if I correctly changed the AUTOSTART= and restarted the service. at first it picks up, and than it rotate to all the .conf server files in the folder.
Not sure it loads them all at once as if I had AUTOSTART="all" or if it loads one at the time. but for sure, at a point in time I find myself on a different country without having changed myself.
So far my only choice is to tae all .conf files out but the one I need.
This makes it harder to choose a server when I need to change it.
QUESTION:
Anyone knows what is going on or what do I do wrong?
Apreciate your help.
thanks
regards
the situation:
I would like to choose the server to connect to by choosing the AUTOSTART= in the /etc/default/openvpn flie.
There are variables and values to do so:
#
#AUTOSTART="all"
#AUTOSTART="none"
AUTOSTART="Netherlnds"
this AUTOSTART="<value of my choice>" is modified by a script that changes the country where to connect to (I use PIA commercial vpn provider).
So, I have a number of .conf files that are correctly set (checked and double checked. they all work if picked manually). Say: Netherlands.conf, uk.conf and US.conf.
I need one at the time when ever is the need of a change, and I do that by running a script.
The script DOES change the AUTOSTART= (I checked that too).
I, of course, also restarted the service:
sudo systemctl daemon-reload
sudo systemctl restart openvpn@Netherlands.service
The issue:
Even if I correctly changed the AUTOSTART= and restarted the service. at first it picks up, and than it rotate to all the .conf server files in the folder.
Not sure it loads them all at once as if I had AUTOSTART="all" or if it loads one at the time. but for sure, at a point in time I find myself on a different country without having changed myself.
So far my only choice is to tae all .conf files out but the one I need.
This makes it harder to choose a server when I need to change it.
QUESTION:
Anyone knows what is going on or what do I do wrong?
Apreciate your help.
thanks
regards