Skip to content

Commit

Permalink
contrib/openvpn: add service files and switch to slibtool
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnarwhal committed Aug 27, 2024
1 parent 993d3ff commit 6221ebd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
4 changes: 4 additions & 0 deletions contrib/openvpn/files/openvpn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# openvpn service config files

OPENVPN_CLIENT_CONFIG=default.conf
OPENVPN_SERVER_CONFIG=default.conf
7 changes: 7 additions & 0 deletions contrib/openvpn/files/openvpn-client
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# openvpn client service

type = process
command = /usr/bin/openvpn --suppress-timestamps --nobind --syslog openvpn-client --config /etc/openvpn/client/${OPENVPN_CLIENT_CONFIG}
env-file = /etc/default/openvpn
depends-on = network.target
smooth-recovery = true
7 changes: 7 additions & 0 deletions contrib/openvpn/files/openvpn-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# openvpn server service

type = process
command = /usr/bin/openvpn --status /var/log/openvpn-server-status.log --status-version 2 --suppress-timestamps --syslog openvpn-server --config /etc/openvpn/server/${OPENVPN_SERVER_CONFIG}
env-file = /etc/default/openvpn
depends-on = network.target
smooth-recovery = true
8 changes: 6 additions & 2 deletions contrib/openvpn/template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname = "openvpn"
pkgver = "2.6.12"
pkgrel = 0
pkgrel = 1
build_style = "gnu_configure"
configure_args = [
"--disable-systemd",
Expand All @@ -13,7 +13,7 @@
hostmakedepends = [
"automake",
"iproute2",
"libtool",
"slibtool",
"pkgconf",
"python",
]
Expand Down Expand Up @@ -42,4 +42,8 @@ def post_install(self):
self.files_path / "update-resolv-conf", "etc/openvpn", mode=0o744
)

self.install_file(self.files_path / "openvpn", "etc/default")
self.install_service(self.files_path / "openvpn-client")
self.install_service(self.files_path / "openvpn-server")

self.install_license("COPYING")

0 comments on commit 6221ebd

Please sign in to comment.