Re: systemctl openvpn won't start

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

 



Yes, a symlink you mentioned will probably work for him.

From the link you posted:
sudo systemctl edit --full nginx.service

This will load the current unit file into the editor, where it can be modified. When the editor exits, the changed file will be written to /etc/systemd/system, which will take precedence over the system's unit definition (usually found somewhere in /lib/systemd/system).

The above does exactly what I was advising; write the new unit file to /etc/systemd/system/ .


I actually have /etc/systemd/system/openvpn@server.service on Fedora 22:
.include /lib/systemd/system/openvpn@.service

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

[Service]
Environment="OPENSSL_ENABLE_MD5_VERIFY=1"
This method only overrides some of what is in /lib/systemd/system/openvpn@.service.
Therefor, any system upgrade changes are passed thru.
[0:root@elmo shorewall]$ ls -lZ /lib/systemd/system/openvpn@.service /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
-rw-r--r--. 1 root root system_u:object_r:systemd_unit_file_t:s0 321 May 10  2016 /lib/systemd/system/openvpn@.service

[0:root@elmo shorewall]$ systemctl status openvpn@server.service
openvpn@server.service - OpenVPN Robust And Highly Flexible Tunneling Application On server
   Loaded: loaded (/etc/systemd/system/openvpn@server.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2017-11-18 20:55:02 EST; 1 weeks 0 days ago
  Process: 2095 ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf (code=exited, status=0/SUCCESS)
 Main PID: 2228 (openvpn)
   CGroup: /system.slice/system-openvpn.slice/openvpn@server.service
           └─2228 /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/server.pid --cd /etc/openvpn/ --config server.conf

/etc/systemd/system/mariadb.service:
.include /usr/lib/systemd/system/mariadb.service

[Service]
#LimitNOFILE=infinity
LimitNOFILE=65536
LimitMEMLOCK=infinity

/etc/systemd/system/clamd@scan.service:
.include /usr/lib/systemd/system/clamd@.service

[Unit]
Description = Generic clamav scanner daemon

[Install]
WantedBy = multi-user.target

[Service]
StandardOutput=null
StandardError=null
Restart=no
#CPUSchedulingPolicy=idle
#IOSchedulingClass=idle
Nice=16
CPUSchedulingPolicy=other
IOSchedulingClass=best-effort
# 0 = highest, 7 = lowest
IOSchedulingPriority=5

/etc/systemd/system/spamassassin.service:
.include /usr/lib/systemd/system/spamassassin.service

[Service]
Restart=no
This technique only overrides the installation .service unit with the lines provided.

This is NOT corrupting systemd.  It's how systemd was designed to be used.

Bill

_______________________________________________
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