mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-02-14 20:31:57 +00:00
Fix omr-6in4 putting dirty data in log
This commit is contained in:
parent
650638da69
commit
afacd976c8
2 changed files with 7 additions and 7 deletions
|
@ -236,9 +236,9 @@ fi
|
|||
|
||||
# Add OpenMPTCProuter VPS script version to /etc/motd
|
||||
if grep --quiet 'OpenMPTCProuter VPS' /etc/motd; then
|
||||
sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS 0.26 >:' /etc/motd
|
||||
sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS 0.27 >:' /etc/motd
|
||||
else
|
||||
echo '< OpenMPTCProuter VPS 0.26 >' >> /etc/motd
|
||||
echo '< OpenMPTCProuter VPS 0.27 >' >> /etc/motd
|
||||
fi
|
||||
|
||||
if [ "$update" = "0" ]; then
|
||||
|
|
|
@ -31,17 +31,17 @@ _ping() {
|
|||
|
||||
while true; do
|
||||
source /etc/shorewall/params.vpn
|
||||
local iface
|
||||
iface=""
|
||||
currentaddr=$(ip addr show omr-6in4 | grep link/sit | awk '{print $2}' | tr -d "\n")
|
||||
currentpeer=$(ip addr show omr-6in4 | grep link/sit | awk '{print $4}' | tr -d "\n")
|
||||
if [ -n "$currentpeer" ]; then
|
||||
_ping $currentpeer
|
||||
status=$?
|
||||
if ! $(exit $status) || [ "$currentpeer" != "$OMR_ADDR" ]; then
|
||||
allip_tcp=$(ip -4 addr show gt-tun0 | grep inet)
|
||||
allip_udp=$(ip -4 addr show gt-udp-tun0 | grep inet)
|
||||
allip_mlvpn=$(ip -4 addr show mlvpn0 | grep inet)
|
||||
allip_openvpn=$(ip -4 addr show tun0 | grep inet)
|
||||
allip_tcp=$(ip -4 addr show gt-tun0 2>/dev/null | grep inet)
|
||||
allip_udp=$(ip -4 addr show gt-udp-tun0 2>/dev/null | grep inet)
|
||||
allip_mlvpn=$(ip -4 addr show mlvpn0 2>/dev/null | grep inet)
|
||||
allip_openvpn=$(ip -4 addr show tun0 2>/dev/null | grep inet)
|
||||
allip="$allip_tcp
|
||||
$allip_udp
|
||||
$allip_openvpn
|
||||
|
|
Loading…
Reference in a new issue