Open solsticedhiver opened 3 years ago
Temporary files should be stored in /tmp or better a directory in /tmp created with mktemp It is not yet in the FHS, but it is already largely used that /run is used for transient like pid_file of process or services. For example in /run/piavpn-manual could store resolv_conf_backup, pia_pid, route_info, etc ... if some are not stored in /tmp
The PIA Desktop app currently uses /opt/piavpn/
so we are currenly using /opt/piavpn-manual/
for consistency, however I do agree that /tmp/
would be better fitted for keeping the temporary configs.
If you have time to open a PR, please also test the change extensively (preferably on multiple distributions) to be sure it does not break current functionality (the scripts were designed to disconnect the previous connection before creating a new one) and doesn't have any other random effects.
The random portion of the directory name is crucial for the security and avoid race conditions.
And the port used for port forwarding needs to be exported somewhere (in run/piavpn-manual ?) to be available to other process that needs that port.
Agreed, though this a different topic/ticket. A PR for this change would be a lot easier to approve, as it can't really break anything.
If you have time to open a PR, please use different file names for OpenVPN and WireGuard. The name of the file can not be random, as it would defeat the purpose.
I had to add line to port_forwarding.sh to get that done but that is expected I guess from the README.md
Yes. The idea behind the repo is to enable you to configure your system the way you like it. This is also the reason why we can't go to deep into technology on this repo, as it has to be easy to read and to understand.
/opt
should be considered read-only by the scripts.Temporary files should be stored in
/tmp
or better a directory in/tmp
created withmktemp
. For exampleThe random portion of the directory name is crucial for the security and avoid race conditions.
It is not yet in the FHS, but it is already largely used that
/run
is used for transient like pid_file of process or services.For example in
/run/piavpn-manual
could store resolv_conf_backup, pia_pid, route_info, etc ... if some are not stored in/tmp
This is linux-centered and I don't know of BSDs ...
And the port used for port forwarding needs to be exported somewhere (in
run/piavpn-manual
?) to be available to other process that needs that port.I had to add line to
port_forwarding.sh
to get that done but that is expected I guess from the README.md