Skip to content

Commit

Permalink
Install openvpn
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-laguna committed Mar 5, 2019
1 parent ab50525 commit 4c7a24c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
13 changes: 13 additions & 0 deletions recipes-connectivity/openvpn/openvpn/openvpn@.service
@@ -0,0 +1,13 @@
[Unit]
Description=Our version of openvpn service
After=syslog.target network.target
ConditionPathExists=/storage/openvpn/rte.conf

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

[Install]
WantedBy=multi-user.target
19 changes: 19 additions & 0 deletions recipes-connectivity/openvpn/openvpn_%.bbappend
@@ -0,0 +1,19 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

PACKAGES =+ "${PN}-rte"

RTE_VPN_CONFIG_DIR = "/storage/openvpn"

FILES_${PN}-rte = "${RTE_VPN_CONFIG_DIR}"

do_install_prepend() {
sed -i 's/CONFIG_DIR=\/etc/CONFIG_DIR=\/storage/' ${WORKDIR}/openvpn
}

do_install_append() {
install -d ${D}/${RTE_VPN_CONFIG_DIR}
}

SYSTEMD_SERVICE_${PN}-rte = "openvpn@rte.service"
SYSTEMD_PACKAGES += "${PN}-rte"
SYSTEMD_AUTO_ENABLE_${PN}-rte = "enable"
2 changes: 2 additions & 0 deletions recipes-extended/packagegroups/packagegroup-rte.bb
Expand Up @@ -30,6 +30,8 @@ RDEPENDS_packagegroup-rte-core = " \
openssh-sftp-server \
swupdate \
u-boot \
openvpn \
openvpn-rte \
"

RDEPENDS_packagegroup-rte-utils = " \
Expand Down

0 comments on commit 4c7a24c

Please sign in to comment.