- Adjust some log types,
- Add some log info.
This commit is contained in:
@@ -33,15 +33,6 @@ declare -g VPN_STATUS_LOCK
|
||||
|
||||
|
||||
|
||||
#if [ ! -v LOG ] || [[ "${LOG}" == "" ]]
|
||||
#then
|
||||
# export LOG=":"
|
||||
#fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------------------------------------------------------
|
||||
# vpn_config_make
|
||||
#--------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -54,7 +45,7 @@ vpn_config_make()
|
||||
|
||||
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} 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
|
||||
do
|
||||
log_info "VPN" "New supervisor loop!"
|
||||
|
||||
for job_id in ${VPN_JOB_ID_LIST}
|
||||
do
|
||||
vpn_job_tab_get "${job_id}"
|
||||
@@ -417,6 +410,8 @@ vpn_start()
|
||||
{
|
||||
local daemon_pid
|
||||
|
||||
|
||||
log_info "VPN" "Starting VPN..."
|
||||
|
||||
if [[ -s ${VPN_PID_FILE} ]]
|
||||
then
|
||||
@@ -439,6 +434,8 @@ vpn_start()
|
||||
else
|
||||
log_info "VPN" "Daemon already running PId: [${daemon_pid}]"
|
||||
fi
|
||||
|
||||
log_info "VPN" "VPN started!"
|
||||
}
|
||||
|
||||
|
||||
@@ -454,6 +451,8 @@ vpn_stop()
|
||||
local daemon_pid
|
||||
|
||||
|
||||
log_info "VPN" "Stoping VPN..."
|
||||
|
||||
if [[ -s ${VPN_PID_FILE} ]]
|
||||
then
|
||||
daemon_pid=$( cat ${VPN_PID_FILE})
|
||||
@@ -478,6 +477,8 @@ vpn_stop()
|
||||
vpn_jobs_kill
|
||||
|
||||
vpn_job_tab_deinit
|
||||
|
||||
log_info "VPN" "VPN stoped!"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user