From 0f23d4f6122ef4f425ba9a791a55c35f4ec30862 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 28 Mar 2026 09:21:05 +0100 Subject: [PATCH] Enhance OpenVPN logging and verbosity settings https://github.com/alexbelgium/hassio-addons/issues/2611 @litinoveweedle --- qbittorrent/rootfs/usr/local/sbin/vpn | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/qbittorrent/rootfs/usr/local/sbin/vpn b/qbittorrent/rootfs/usr/local/sbin/vpn index 55a248570..ec815832b 100755 --- a/qbittorrent/rootfs/usr/local/sbin/vpn +++ b/qbittorrent/rootfs/usr/local/sbin/vpn @@ -499,15 +499,23 @@ _openvpn_up() { chmod 755 ${config["PostDownScript"]} # Define logging - log_path="/dev/null" - [[ "$log_level" == "debug" ]] && log_path="/proc/1/fd/1" + declare -A verbosity=( + ["fatal"]=1 + ["error"]=1 + ["warning"]=2 + ["notice"]=3 + ["info"]=4 + ["debug"]=5 + ["trace"]=6 + ) # Start OpenVPN in the background _cmd "/usr/sbin/openvpn \ --config "${config["ConfigFile"]}" \ --client \ --daemon \ - --log "$log_path" \ + --verb ${verbosity[${$log_level}]} \ + --log "/proc/1/fd/1" \ --script-security 2 \ --auth-user-pass "${OPENVPN_STATE_DIR}/credentials.conf" \ --auth-retry none \