- Adjust some log types,
- Add some log info.
This commit is contained in:
@@ -38,12 +38,6 @@ declare -g DNS_CACHE_LOCK
|
|||||||
declare -g DNS_CACHE_UPDATED=0
|
declare -g DNS_CACHE_UPDATED=0
|
||||||
|
|
||||||
|
|
||||||
#if [ ! -v LOG ] || [[ "${LOG}" == "" ]]
|
|
||||||
#then
|
|
||||||
# export LOG=":"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1184,11 +1184,15 @@ network_deinit()
|
|||||||
|
|
||||||
network_start()
|
network_start()
|
||||||
{
|
{
|
||||||
|
log_info "Network" "Starting network..."
|
||||||
|
|
||||||
network_table_init
|
network_table_init
|
||||||
|
|
||||||
network_bridge_init
|
network_bridge_init
|
||||||
|
|
||||||
network_forward_start
|
network_forward_start
|
||||||
|
|
||||||
|
log_info "Network" "Network started!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1201,6 +1205,7 @@ network_start()
|
|||||||
|
|
||||||
network_stop()
|
network_stop()
|
||||||
{
|
{
|
||||||
|
log_info "Network" "Stoping network..."
|
||||||
|
|
||||||
network_forward_stop
|
network_forward_stop
|
||||||
|
|
||||||
@@ -1208,6 +1213,8 @@ network_stop()
|
|||||||
|
|
||||||
network_table_deinit
|
network_table_deinit
|
||||||
|
|
||||||
|
log_info "Network" "Network stoped!"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,15 +33,6 @@ declare -g VPN_STATUS_LOCK
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if [ ! -v LOG ] || [[ "${LOG}" == "" ]]
|
|
||||||
#then
|
|
||||||
# export LOG=":"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------------------------------------------
|
||||||
# vpn_config_make
|
# vpn_config_make
|
||||||
#--------------------------------------------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------------------------------------------
|
||||||
@@ -54,7 +45,7 @@ vpn_config_make()
|
|||||||
|
|
||||||
local mng_port=$(( 2330 + ${Device/tun/}))
|
local mng_port=$(( 2330 + ${Device/tun/}))
|
||||||
|
|
||||||
log_info "VPN" "Creating config File: [${Config_File}] Device: [${Device}] Mng_Port: (${mng_port}) Target_Config: [${Target_Config}]"
|
log_trace "VPN" "Creating config File: [${Config_File}] Device: [${Device}] Mng_Port: (${mng_port}) Target_Config: [${Target_Config}]"
|
||||||
|
|
||||||
${DEBUG} cp -f ${VPN_TEMPLATE_FILE} ${Config_File}
|
${DEBUG} cp -f ${VPN_TEMPLATE_FILE} ${Config_File}
|
||||||
${DEBUG} sed -e "s/TARGET-CFG/${Target_Config}-client.conf/" -e "s/VPN-DEVICE/${Device}/" -e "s/MNG-PORT/${mng_port}/" -i ${Config_File}
|
${DEBUG} sed -e "s/TARGET-CFG/${Target_Config}-client.conf/" -e "s/VPN-DEVICE/${Device}/" -e "s/MNG-PORT/${mng_port}/" -i ${Config_File}
|
||||||
@@ -291,6 +282,8 @@ vpn_supervisor()
|
|||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
log_info "VPN" "New supervisor loop!"
|
||||||
|
|
||||||
for job_id in ${VPN_JOB_ID_LIST}
|
for job_id in ${VPN_JOB_ID_LIST}
|
||||||
do
|
do
|
||||||
vpn_job_tab_get "${job_id}"
|
vpn_job_tab_get "${job_id}"
|
||||||
@@ -417,6 +410,8 @@ vpn_start()
|
|||||||
{
|
{
|
||||||
local daemon_pid
|
local daemon_pid
|
||||||
|
|
||||||
|
|
||||||
|
log_info "VPN" "Starting VPN..."
|
||||||
|
|
||||||
if [[ -s ${VPN_PID_FILE} ]]
|
if [[ -s ${VPN_PID_FILE} ]]
|
||||||
then
|
then
|
||||||
@@ -439,6 +434,8 @@ vpn_start()
|
|||||||
else
|
else
|
||||||
log_info "VPN" "Daemon already running PId: [${daemon_pid}]"
|
log_info "VPN" "Daemon already running PId: [${daemon_pid}]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
log_info "VPN" "VPN started!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -454,6 +451,8 @@ vpn_stop()
|
|||||||
local daemon_pid
|
local daemon_pid
|
||||||
|
|
||||||
|
|
||||||
|
log_info "VPN" "Stoping VPN..."
|
||||||
|
|
||||||
if [[ -s ${VPN_PID_FILE} ]]
|
if [[ -s ${VPN_PID_FILE} ]]
|
||||||
then
|
then
|
||||||
daemon_pid=$( cat ${VPN_PID_FILE})
|
daemon_pid=$( cat ${VPN_PID_FILE})
|
||||||
@@ -478,6 +477,8 @@ vpn_stop()
|
|||||||
vpn_jobs_kill
|
vpn_jobs_kill
|
||||||
|
|
||||||
vpn_job_tab_deinit
|
vpn_job_tab_deinit
|
||||||
|
|
||||||
|
log_info "VPN" "VPN stoped!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user