Subject: [PATCH] main/openvpn: Add instance name to OpenVPN --daemon param

From: Stefano Sasso <[email-masked]>
Date: Fri, 6 Mar 2020 15:34:46 +0100

The --daemon OpenVPN params also controls the tag OpenVPN uses to ship
logs to syslog. If multiple OpenVPN instances are used, the user may
want to apply syslog filters, to have different log files for the
different instances.
If you specify an additional --daemon option in the config file, it will
be ignored, since the one on the command line is preferred.
---
 main/openvpn/openvpn.initd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/openvpn/openvpn.initd b/main/openvpn/openvpn.initd
index 8c11106..085ee5e 100644
--- a/main/openvpn/openvpn.initd
+++ b/main/openvpn/openvpn.initd
@@ -22,7 +22,7 @@ instance_name=${RC_SVCNAME#*.}
 pidfile="/run/$RC_SVCNAME.pid"
 command="/usr/sbin/openvpn"
 command_args="
-	--daemon
+	--daemon $instance_name
 	--config $cfgfile
 	--writepid $pidfile
 	--setenv RC_SVCNAME $RC_SVCNAME
-- 
1.8.3.1