- Start new external VPN management implementation.

This commit is contained in:
2025-07-08 23:25:17 +02:00
parent de448dd924
commit bd5c0ecbd6
4 changed files with 118 additions and 31 deletions

View File

@@ -1,11 +1,12 @@
#!/bin/bash
#DEBUG=""
DEBUG="echo"
#DEBUG="echo"
#DEBUG=":"
LOG=":"
#LOG=":"
#LOG="echo"
LOG=""
@@ -52,33 +53,8 @@ then
${DEBUG} ip route del table ${dst_table} default
${DEBUG} ip route add table ${dst_table} default dev ${Dev}
# (
# sleep 3
#
# i=0
#
# while [[ ${remote_address} == "" && $i -lt 5 ]]
# do
# remote_address=$(/usr/local/sbin/ns-launch 3 ${dst_table} /usr/local/bin/my_address_get 2>/dev/null)
# echo >>${log_file} "$(date): Up: ${Dev}: Remote_Address=${remote_address} try=$i"
#
# i=$(($i + 1))
# sleep 5
# done
#
# if [[ remote_address != "" ]]
# then
# echo >>${log_file} "$(date): Up: ${Dev}: set ${remote_address} to vpn${dst_id}.vpn.rx3"
# /usr/local/sbin/ip_host_update vpn${dst_id} vpn.rx3 ${remote_address} 60
# else
# echo >>${log_file} "$(date): Up: ${Dev}: VPN not working?"
# fi
#
# echo >>${log_file} "$(date): Up: ${Dev}: Done!"
# ) &
echo >>${LOG_FILE} "$(date): Up: ${Dev}: Partially Done..."
echo >>${LOG_FILE} "$(date): Up: ${Dev}: Done!"
else
echo >>${LOG_FILE} " Status: [ERROR]!"
echo >>${LOG_FILE} "$(date): Up: [${Dev}] Done"