- Start VPN gateways support implementation.
This commit is contained in:
45
usr/local/sbin/openvpn-client-up
Executable file
45
usr/local/sbin/openvpn-client-up
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
#DEBUG=""
|
||||
#DEBUG="echo"
|
||||
#DEBUG=":"
|
||||
|
||||
#LOG=":"
|
||||
#LOG="echo"
|
||||
#LOG=""
|
||||
|
||||
|
||||
|
||||
# Includes
|
||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
. /usr/local/lib/network.bash
|
||||
|
||||
|
||||
|
||||
# Global Variables
|
||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#LOG_FILE=/var/log/openvpn/up-down.log
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Main
|
||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Output_Param_File="$1"
|
||||
|
||||
|
||||
network_init
|
||||
|
||||
|
||||
|
||||
line="[${dev}]: Local_Int_Address: [${ifconfig_local}] Remote_Int_Address: [${ifconfig_pool_remote_ip}] Remote_Ext_Addres: [${untrusted_ip}] Common_Name: [${common_name}] Output_Param_File: [${Output_Param_File}]"
|
||||
|
||||
log_info "VPN-Client-Up" "$line" " Status: [OK]"
|
||||
|
||||
touch /etc/openvpn/status/${common_name}.status
|
||||
|
||||
log_trace "VPN-Client-Up" "[${dev}]: Done!"
|
||||
Reference in New Issue
Block a user