Re: systemctl openvpn won't start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Putting your localized file in /lib/systemd/system is the problem.  The upgrade
wiped it out.  Localizations should go in /etc/systemd/system

The Fedora 25 /lib/systemd/system/openvpn.service unit file from the rpm:
[Unit]
Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I
After=network.target

[Service]
PrivateTmp=true
Type=forking
PIDFile=/var/run/openvpn/%i.pid
ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf

[Install]
WantedBy=multi-user.target
This file should not be edited.

My /etc/systemd/system/openvpn@server.service that I created:
.include /lib/systemd/system/openvpn@.service

[Unit]
After=syslog.target
After=network.target

[Service]
Environment="OPENSSL_ENABLE_MD5_VERIFY=1"

The text between the @ and the dot ('server') in the unit name becomes the %i
variable for the unit file.  In this case, it's the config file name and the pid file name:
[0:root@elmo ~]$ ls -lZ /etc/openvpn/server.conf /var/run/openvpn/server.pid
-rw-r-----. 1 root root system_u:object_r:openvpn_etc_t:s0     11400 Jul 24 07:07 /etc/openvpn/server.conf
-rw-r--r--. 1 root root system_u:object_r:openvpn_var_run_t:s0     5 Nov 18 20:55 /var/run/openvpn/server.pid

HTH,
Bill
 
On 11/22/2017 12:13 PM, Outback Dingo wrote:
yeah somethings changed it used to be simple now we have to
create/copy files to systemd.... i just went through this today also

specifically in Section 5. Setting up automatic OpenVPN connection on
system start
*This step requires that you set up automatic login from the previous step.

https://hide.me/en/vpnsetup/fedora/openvpn/

On Wed, Nov 22, 2017 at 5:50 PM, Bill Shirley
<bshirley@xxxxxxxxxxxxxxxxx> wrote:
Is the .service file in /etc/systemd/system ?
[0:root@elmo ~ 2]$ ls -lZ /etc/systemd/system/openvpn@server.service
-rw-r--r--. 1 root root system_u:object_r:systemd_unit_file_t:s0 148 Aug  6
2015 /etc/systemd/system/openvpn@server.service
Of course yours would be openvpn@client-ibecker2.service

Bill


On 11/22/2017 7:02 AM, Neal Becker wrote:

Was working before upgrade to f27.  Now:

sudo systemctl start openvpn@client-ibecker2
Failed to start openvpn@client-ibecker2.service: Unit openvpn@client-
ibecker2.service not found.

According to
https://fedoraproject.org/wiki/Openvpn#Working_with_systemd

I would need to have /etc/openvpn/client-ibecker2.conf, which is there (as
it's been since 2015).

I don't know why this isn't working, or how to debug it (systemctl doesn't
seem to have any debug flags)
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux