diff --git a/recipes-config/sysmocom-openvpn-config/sysmocom-openvpn-config_1.bb b/recipes-config/sysmocom-openvpn-config/sysmocom-openvpn-config_1.bb index e1518e6..46b5aed 100644 --- a/recipes-config/sysmocom-openvpn-config/sysmocom-openvpn-config_1.bb +++ b/recipes-config/sysmocom-openvpn-config/sysmocom-openvpn-config_1.bb @@ -7,10 +7,19 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 SRC_URI = "file://sysmocom-vpn.conf" PR = "r4" -CONFFILES_${PN} = "${sysconfdir}/openvpn/sysmocom-vpn.conf" +CONFFILES_${PN} = "${sysconfdir}/openvpn/sysmocom-vpn.conf.off" PACKAGE_ARCH = "all" do_install() { install -d ${D}${sysconfdir}/openvpn - install -m 0644 ${WORKDIR}/sysmocom-vpn.conf ${D}${sysconfdir}/openvpn + install -m 0644 ${WORKDIR}/sysmocom-vpn.conf ${D}${sysconfdir}/openvpn/sysmocom-vpn.conf.off +} + +# Always enable the OpenVPN service. This assumes that +# this package will never be inside the nornal sysmocom +# feed. +FILES_${PN} += "${systemd_unitdir}" +do_install_append() { + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/ + ln -sf ../openvpn.service ${D}${systemd_unitdir}/system/multi-user.target.wants/ }