aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-01-11 22:44:28 +0100
committerJakub Jirutka <jakub@jirutka.cz>2020-01-11 22:43:37 +0100
commitc7b2b8c96230c79c4780eada0414ae2e2c05f296 (patch)
treeb263a4285eb7b670493650672513a92d44a3ec3b
parentb1359302e60ca54936a24d637e6294557c67d916 (diff)
downloadaports-c7b2b8c96230c79c4780eada0414ae2e2c05f296.tar.bz2
aports-c7b2b8c96230c79c4780eada0414ae2e2c05f296.tar.xz
main/openvpn: add commands reload and stats to init script
-rw-r--r--main/openvpn/APKBUILD4
-rw-r--r--main/openvpn/openvpn.initd16
2 files changed, 18 insertions, 2 deletions
diff --git a/main/openvpn/APKBUILD b/main/openvpn/APKBUILD
index 34c2b2383a..7d1818bae3 100644
--- a/main/openvpn/APKBUILD
+++ b/main/openvpn/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openvpn
pkgver=2.4.8
-pkgrel=0
+pkgrel=1
pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)"
url="https://openvpn.net/"
arch="all"
@@ -63,7 +63,7 @@ pam() {
}
sha512sums="d37a768c7f8683c23ae0d73d7e9947b5a1dac26580b0d7fe72454319acfe40375fbe150e68daee865a78e0269740e4ac5c96cdb8a7f02a1287ea93752ee0be06 openvpn-2.4.8.tar.xz
-3594937d4cc9d7b87ac6a3af433f651ed9695f41586994f9d9789554fbe3f87f054b997b89486eda4ae0b852d816aac9007222168d585910aa9f255073324bd9 openvpn.initd
+50589e6b140bdf1c0454c5bb45b154e963c51e0e2f46e7e4538e0a784ac4f2b3c714a7f5fe1d25c56643f798503b42091e304dd26e664636f06ad453a2a39235 openvpn.initd
6b2353aca9df7f43044e4e37990491b4ba077e259ebe13b8f2eb43e35ca7a617c1a65c5bfb8ab05e87cf12c4444184ae064f01f9abbb3c023dbbc07ff3f9c84e openvpn.confd
cdb73c9a5b1eb56e9cbd29955d94297ce5a87079419cd626d6a0b6680d88cbf310735a53f794886df02030b687eaea553c7c569a8ea1282a149441add1c65760 openvpn.up
4456880d5c2db061219ba94e4052786700efa5e685f03b0d12d75a6023e3c0fc7b5242cc3d2bd3988e42fcd99701ab13a6257b1a0943b812318d30c64843ad27 openvpn.down"
diff --git a/main/openvpn/openvpn.initd b/main/openvpn/openvpn.initd
index dae0e38334..6f05671afd 100644
--- a/main/openvpn/openvpn.initd
+++ b/main/openvpn/openvpn.initd
@@ -1,6 +1,10 @@
#!/sbin/openrc-run
extra_commands="checkconfig"
+extra_started_commands="reload stats"
+
+description_reload="Reload OpenVPN using SIGUSR1"
+description_stats="Dump OpenVPN statistics to syslog"
instance_name=${RC_SVCNAME#*.}
[ "$instance_name" != "openvpn" ] \
@@ -125,6 +129,18 @@ stop() {
default_stop
}
+reload() {
+ ebegin "Reloading $name"
+ start-stop-daemon --signal USR1 --pidfile "$pidfile"
+ eend $?
+}
+
+stats() {
+ ebegin "Dumping $name statistics to syslog"
+ start-stop-daemon --signal USR2 --pidfile "$pidfile"
+ eend $?
+}
+
cfgfile_has_option() {
grep -Eq "^\s*$1\s" "$cfgfile"
}