openvpn: bring back "openvpn@.service" #16

Merged
hwelte merged 1 commits from osmith/201705 into 201705 2023-06-12 11:26:36 +00:00
2 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1,17 @@
[Unit]
Description=OpenVPN connection to %i
PartOf=openvpn.service
ReloadPropagatedFrom=openvpn.service
[Service]
Type=forking
ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn.%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf
ExecReload=/bin/kill -HUP $MAINPID
WorkingDirectory=/etc/openvpn
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target

View File

@ -7,11 +7,12 @@ DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '
inherit autotools systemd update-rc.d pkgconfig
PR = "r1"
PR = "r2"
SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
file://0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch \
file://openvpn \
file://openvpn@.service \
file://openvpn.service \
"
@ -66,7 +67,8 @@ do_install_append() {
install -d -m 710 ${D}/${localstatedir}/lib/openvpn
# Keep openvpn.service to match manuals (SYS#6303)
# Keep openvpn@.service, openvpn.service to match manuals (SYS#6303)
install -m 0644 ${WORKDIR}/openvpn@.service ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/openvpn.service ${D}${systemd_system_unitdir}
}
@ -77,6 +79,7 @@ RRECOMMENDS_${PN} = "kernel-module-tun"
FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
FILES_${PN} += "${systemd_system_unitdir}/openvpn-server@.service \
${systemd_system_unitdir}/openvpn-client@.service \
${systemd_system_unitdir}/openvpn@.service \
${systemd_system_unitdir}/openvpn.service \
${nonarch_libdir}/tmpfiles.d \
"