mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-12-16 00:47:02 +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() {
|
function initialCheck() {
|
||||||
|
log_debug "Checking root privileges..."
|
||||||
if ! isRoot; then
|
if ! isRoot; then
|
||||||
log_fatal "Sorry, you need to run this script as root."
|
log_fatal "Sorry, you need to run this script as root."
|
||||||
fi
|
fi
|
||||||
|
log_debug "Root check passed"
|
||||||
|
|
||||||
|
log_debug "Checking TUN device availability..."
|
||||||
if ! tunAvailable; then
|
if ! tunAvailable; then
|
||||||
log_fatal "TUN is not available."
|
log_fatal "TUN is not available."
|
||||||
fi
|
fi
|
||||||
|
log_debug "TUN device available at /dev/net/tun"
|
||||||
|
|
||||||
|
log_debug "Detecting operating system..."
|
||||||
checkOS
|
checkOS
|
||||||
|
log_info "Detected OS: $OS (${PRETTY_NAME:-unknown})"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if OpenVPN version is at least the specified version
|
# Check if OpenVPN version is at least the specified version
|
||||||
|
|||||||
Reference in New Issue
Block a user