From 236e77af6826af82cf56eed2b725d7fcc2ce86d5 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Fri, 12 Dec 2025 23:47:09 +0100 Subject: [PATCH] feat: add logging for system checks in initialCheck (#1371) Add debug and info logging to initialCheck for better troubleshooting visibility. --- openvpn-install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openvpn-install.sh b/openvpn-install.sh index d3e3695..16ea068 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -234,13 +234,21 @@ function checkOS() { } function initialCheck() { + log_debug "Checking root privileges..." if ! isRoot; then log_fatal "Sorry, you need to run this script as root." fi + log_debug "Root check passed" + + log_debug "Checking TUN device availability..." if ! tunAvailable; then log_fatal "TUN is not available." fi + log_debug "TUN device available at /dev/net/tun" + + log_debug "Detecting operating system..." checkOS + log_info "Detected OS: $OS (${PRETTY_NAME:-unknown})" } # Check if OpenVPN version is at least the specified version