mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-12 02:21:28 +02:00
Debug message
Simplified debug logging setup for OpenVPN.
This commit is contained in:
@@ -11,6 +11,7 @@ declare -a dns_servers_ipv6=()
|
|||||||
|
|
||||||
log_level="$(bashio::config "log_level")"
|
log_level="$(bashio::config "log_level")"
|
||||||
[[ "$log_level" == "debug" ]] && set -x
|
[[ "$log_level" == "debug" ]] && set -x
|
||||||
|
[[ "$log_level" == "debug" ]] && bashio::log.warning "--- Debug mode is active ---"
|
||||||
|
|
||||||
_parse_config() {
|
_parse_config() {
|
||||||
local -n config_ref="$1"
|
local -n config_ref="$1"
|
||||||
@@ -351,11 +352,7 @@ _openvpn_up() {
|
|||||||
|
|
||||||
# Define logging
|
# Define logging
|
||||||
log_path="/dev/null"
|
log_path="/dev/null"
|
||||||
if [[ "$log_level" == "debug" ]]; then
|
[[ "$log_level" == "debug" ]] && log_path="/proc/1/fd/1"
|
||||||
bashio::log.warning "Starting openvpn in debug mode"
|
|
||||||
bashio::log.warning "------------------------------"
|
|
||||||
log_path="/proc/1/fd/1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start OpenVPN in the background
|
# Start OpenVPN in the background
|
||||||
_cmd "/usr/sbin/openvpn \
|
_cmd "/usr/sbin/openvpn \
|
||||||
|
|||||||
Reference in New Issue
Block a user