mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-12-14 16:17:03 +01:00
feat: add logging for system checks in initialCheck (#1371)
Add debug and info logging to initialCheck for better troubleshooting visibility.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user