- Bug fixes next to Darkstar live testing...
- Fix .ovpn download file type.
This commit is contained in:
@@ -71,7 +71,7 @@ declare -g NETWORK_LOG_FILE
|
||||
declare -g NETWORK_LOG_LOCK
|
||||
#declare -g NETWORK_LOG_LOCK="${NETWORK_LOG_FILE}"
|
||||
|
||||
declare -g NETWORK_LOG_TRACE="DISABLE"
|
||||
declare -g NETWORK_LOG_TRACE="DISABLED"
|
||||
|
||||
declare -g NETWORK_NC_TIMEOUT
|
||||
|
||||
@@ -134,14 +134,24 @@ network_common_openvpn_stats_get()
|
||||
fi
|
||||
|
||||
if [[ "${device}" != "" ]]
|
||||
then
|
||||
then
|
||||
ovpn_stat_client_name=""
|
||||
|
||||
if [[ "${NETWORK_OPENVPN_STATUS}" =~ ("${device}.status: TITLE") ]]
|
||||
then
|
||||
# OpenVPN Server Mode
|
||||
|
||||
OIFS="${IFS}"
|
||||
IFS=","
|
||||
set XXX/$( echo "${NETWORK_OPENVPN_STATUS}" | grep "${device}\.status: CLIENT_LIST,${client},") &>/dev/null || true
|
||||
line="$( echo "${NETWORK_OPENVPN_STATUS}" | grep "${device}\.status: CLIENT_LIST,${client},")" || true
|
||||
|
||||
if [[ "${line}" == "" ]]
|
||||
then
|
||||
line="/var/lib/openvpn/${device}.status: CLIENT_LIST,,,,,,,,,,,,"
|
||||
fi
|
||||
|
||||
set XXX/${line} &>/dev/null || true
|
||||
|
||||
IFS="${OIFS}"
|
||||
|
||||
tmp="${1/XXX*\//}"
|
||||
@@ -1078,7 +1088,7 @@ network_table_set()
|
||||
fi
|
||||
|
||||
|
||||
tab_assign NETWORK_SRC_TAB "${src_id},Table" "${ts_table}"
|
||||
tab_assign NETWORK_SRC_TAB "${src_id},Table" "${nts_table}"
|
||||
|
||||
|
||||
${DEBUG} sed "/^NETWORK_SRC_CONFIG=\"/,/^\"/ { s/^\(${nts_ip//./\\.}[[:space:]]\+\([^\t ]\+[[:space:]]\+\)\{2\}\)[^[:space:]]\+/\1${nts_table}/ }" -i ${NETWORK_CONFIG_FILE}
|
||||
|
||||
Reference in New Issue
Block a user