Daniel and I have been discussing the addition of a simple openvpn rc script, months ago. Maybe this can be useful to others?
Feedback / ok? Index: Makefile =================================================================== RCS file: /cvs/ports/net/openvpn/Makefile,v retrieving revision 1.88 diff -u -p -r1.88 Makefile --- Makefile 6 Mar 2018 12:44:29 -0000 1.88 +++ Makefile 6 Mar 2018 12:53:00 -0000 @@ -3,7 +3,7 @@ COMMENT= easy-to-use, robust, and highly configurable VPN DISTNAME= openvpn-2.4.5 -REVISION= 0 +REVISION= 1 CATEGORIES= net security HOMEPAGE= https://openvpn.net/index.php/open-source/ Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/net/openvpn/pkg/PLIST,v retrieving revision 1.22 diff -u -p -r1.22 PLIST --- pkg/PLIST 29 Sep 2017 16:36:23 -0000 1.22 +++ pkg/PLIST 6 Mar 2018 12:53:00 -0000 @@ -63,3 +63,4 @@ share/examples/openvpn/sample-scripts/br share/examples/openvpn/sample-scripts/bridge-stop share/examples/openvpn/sample-scripts/ucn.pl share/examples/openvpn/sample-scripts/verify-cn +@rcscript ${RCDIR}/openvpn Index: pkg/openvpn.rc =================================================================== RCS file: pkg/openvpn.rc diff -N pkg/openvpn.rc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/openvpn.rc 6 Mar 2018 12:53:00 -0000 @@ -0,0 +1,10 @@ +#!/bin/ksh +# +# $OpenBSD$ + +# No default daemon_flags, adapt to your needs. +daemon="${TRUEPREFIX}/sbin/openvpn --daemon" + +. /etc/rc.d/rc.subr + +rc_cmd $1 -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE