Am 23.03.2012 13:58, schrieb Dr. Michael J. Chudobiak: > On 03/23/2012 08:32 AM, Craig White wrote: >>> As TM has been told elsewhere in this thread, this doesn't work for >>> openvpn, because of its need for a pointer to a specific configuration >>> file - you have to make a manual link, or use some other odd syntax. >>> This is definitely a weird quirk that is not handled elegantly by >>> systemd at the current time. >>> >> sounds like something that should be handled in /etc/sysconfig rather >> than within the systemd files themselves. > > Yes, or provide separate openvpn-server.service and openvpn-client.service files, which read > /etc/openvpn/server.conf and /etc/openvpn/client.conf respectively. > > I imagine it will get sorted out one way or another... at the moment, it is a bleeding-edge corner-case oddity i really really do not understand the problem creating a service file unter /etc/systemd/ - openvpn is a special case at all and the systemd-unit dervied from the @service si written in two minutes [root@srv-rhsoft:~]$ cp /etc/systemd/system/openvpn.service /etc/systemd/system/openvpn2.service [root@srv-rhsoft:~]$ nano /etc/systemd/system/openvpn2.service [root@srv-rhsoft:~]$ systemctl enable openvpn2.service ln -s '/etc/systemd/system/openvpn2.service' '/etc/systemd/system/multi-user.target.wants/openvpn2.service' [root@srv-rhsoft:~]$ systemctl status openvpn2.service openvpn2.service - OpenVPN Loaded: loaded (/etc/systemd/system/openvpn2.service; enabled) Active: inactive (dead) CGroup: name=systemd:/system/openvpn2.service [root@srv-rhsoft:~]$ cat /etc/systemd/system/openvpn2.service [Unit] Description=OpenVPN After=syslog.target network.target [Service] Type=forking PIDFile=/var/run/openvpn/openvpn2.pid ExecStartPre= ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/openvpn2.pid --cd /etc/openvpn/ --config openvpn2.conf ExecStopPost= Restart=always RestartSec=1 [Install] WantedBy=multi-user.target [root@srv-rhsoft:~]$ cat /etc/systemd/system/openvpn.service [Unit] Description=OpenVPN After=syslog.target network.target [Service] Type=forking PIDFile=/var/run/openvpn/openvpn.pid ExecStartPre= ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/openvpn.pid --cd /etc/openvpn/ --config openvpn.conf ExecStopPost= Restart=always RestartSec=1 [Install] WantedBy=multi-user.target [root@srv-rhsoft:~]$ systemctl disable openvpn2.service rm '/etc/systemd/system/multi-user.target.wants/openvpn2.service' [root@srv-rhsoft:~]$ rm -f /etc/systemd/system/openvpn2.service
Attachment:
signature.asc
Description: OpenPGP digital signature
-- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org