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
/etc/default/openvpn AUTOSTART= issue
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
-
- OpenVpn Newbie
- Posts: 14
- Joined: Fri Feb 22, 2019 7:35 pm
Re: /etc/default/openvpn AUTOSTART= issue
The source script is unknown.Anyone knows what is going on or what do I do wrong?
Find another PIA script.I use PIA commercial vpn provider
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
Re: /etc/default/openvpn AUTOSTART= issue
@ d2t93y7c
thanks for your reply. somehow I did not het the notification of your reply.
Can you please develop your answer? Your link to PIA scripts give a number of results that are not related to openvpn scripts to change openvpn server in config files. What are you trying to pointing me to?
What do you mean with "The source script is unknown" ?
If y ou man my script to change the AUTOSTART=... is unknows as I made it. I can add it here but is useless really as all it does is change the AUTOSTART= value (that asctually does change and therefore the script works).
If you mean the /etc/default/openvpn file, that I did not created and Iassume is a openvpn file.
I can also manually (no script) change the AUTOSTART= value.
The thing is... even if the value of AUTOSTART= is changed and remain the same, openvpn server will not take it in consideration. Almost like there is a time slot for it even if the value is not "all".
I made a test:
deleted all config files but one. lets say now the AUTOSTART="Netherlands"
Netherlands is my .conf file
The server starts and connect to Netherlands server.
at a point in time, even with no other .conf files, it switches to US server.
That I really dont understand.
I can force it back to Netherlands but eventually it will go back to US at a point in tmie.
Any idea?
Thanks
thanks for your reply. somehow I did not het the notification of your reply.
Can you please develop your answer? Your link to PIA scripts give a number of results that are not related to openvpn scripts to change openvpn server in config files. What are you trying to pointing me to?
What do you mean with "The source script is unknown" ?
If y ou man my script to change the AUTOSTART=... is unknows as I made it. I can add it here but is useless really as all it does is change the AUTOSTART= value (that asctually does change and therefore the script works).
If you mean the /etc/default/openvpn file, that I did not created and Iassume is a openvpn file.
I can also manually (no script) change the AUTOSTART= value.
The thing is... even if the value of AUTOSTART= is changed and remain the same, openvpn server will not take it in consideration. Almost like there is a time slot for it even if the value is not "all".
I made a test:
deleted all config files but one. lets say now the AUTOSTART="Netherlands"
Netherlands is my .conf file
The server starts and connect to Netherlands server.
at a point in time, even with no other .conf files, it switches to US server.
That I really dont understand.
I can force it back to Netherlands but eventually it will go back to US at a point in tmie.
Any idea?
Thanks