Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • I've updated my question to show that I'm starting the vpns with systemd, how could I pass the --config option to systemd? I don't want to include the config option inside the config file because there are a lot of config files, I'd rather do it centrally like in some openvpn or systemd central configuration. Commented Nov 10, 2017 at 10:12
  • You can edit/copy the systemd unit file to include the option as it calls openvpn. Also a good practice would be to remove the duplicate lines from existing configs (avoiding conflicts), hence you can just add the config entry as you do it. Would it be enough? I can add it to the answer... Commented Nov 10, 2017 at 10:38
  • Is /usr/lib/systemd/system/[email protected] the systemd unit file you're referring to? How exactly can I modify that file to add the 5 config params I need to from the question? Ideally I could create a single file with just those 5 lines it and refer to it in the unit file so that so I can add just one thing to that unit file instead of 5 things. Commented Nov 10, 2017 at 10:50
  • It's pretty much that what I am suggesting. You can "override" the openvpn unit file, updating the ExecStart= line to include an extra --config path/to/conf, where you can have as many parameters as you'd like. If your unit doesn't have such line, please add it to the question so I can figure it out, but mine does. Tell me so I can update the answer accordingly... Commented Nov 10, 2017 at 10:56