mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
sync (#565)
This commit is contained in:
commit
35768fdf4b
4 changed files with 18 additions and 15 deletions
|
@ -601,22 +601,21 @@ while true; do
|
|||
fi
|
||||
fi
|
||||
if [ "$OMR_TRACKER_CHECK_QUALITY" = "1" ]; then
|
||||
if [ "$OMR_TRACKER_PREV_STATUS" = "OK" ]; then
|
||||
if [ -n "$OMR_TRACKER_LOSS" ] && [ "$OMR_TRACKER_LOSS" -ge "$OMR_TRACKER_LOSS_FAILURE" ] && [ "$OMR_TRACKER_STATUS" = "OK" ]; then
|
||||
if [ "$OMR_TRACKER_PREV_STATUS" = "OK" ] && [ "$OMR_TRACKER_STATUS" = "OK" ]; then
|
||||
if [ -n "$OMR_TRACKER_LOSS" ] && [ -n "$OMR_TRACKER_RECOVERY_LOSS" ] && [ "$OMR_TRACKER_LOSS" -ge "$OMR_TRACKER_FAILURE_LOSS" ]; then
|
||||
OMR_TRACKER_STATUS="ERROR"
|
||||
OMR_TRACKER_STATUS_MSG="Packet loss is $OMR_TRACKER_LOSS this is more than limit defined at $OMR_TRACKER_LOSS_FAILURE"
|
||||
fi
|
||||
if [ -n "$OMR_TRACKER_LATENCY" ] && [ "$OMR_TRACKER_LATENCY" -ge "$OMR_TRACKER_LATENCY_FAILURE" ] && [ "$OMR_TRACKER_STATUS" = "OK" ]; then
|
||||
OMR_TRACKER_STATUS_MSG="Packet loss is $OMR_TRACKER_LOSS this is more than failure limit defined at $OMR_TRACKER_FAILURE_LOSS"
|
||||
elif [ -n "$OMR_TRACKER_LATENCY" ] && [ -n "$OMR_TRACKER_FAILURE_LATENCY"] && [ "$OMR_TRACKER_LATENCY" -ge "$OMR_TRACKER_FAILURE_LATENCY" ]; then
|
||||
OMR_TRACKER_STATUS="ERROR"
|
||||
OMR_TRACKER_STATUS_MSG="Latency is $OMR_TRACKER_LATENCY this is more than limit defined at $OMR_TRACKER_LATENCY_FAILURE"
|
||||
OMR_TRACKER_STATUS_MSG="Latency is $OMR_TRACKER_LATENCY this is more than failure limit defined at $OMR_TRACKER_FAILURE_LATENCY"
|
||||
fi
|
||||
elif [ "$OMR_TRACKER_PREV_STATUS" = "ERROR" ]; then
|
||||
OMR_TRACKER_STATUS="ERROR"
|
||||
if [ -n "$OMR_TRACKER_LOSS" ] && [ "$OMR_TRACKER_LOSS" -le "$OMR_TRACKER_LOSS_RECOVERY" ] && [ "$OMR_TRACKER_STATUS" = "OK" ]; then
|
||||
OMR_TRACKER_STATUS="OK"
|
||||
fi
|
||||
if [ -n "$OMR_TRACKER_LATENCY" ] && [ "$OMR_TRACKER_LATENCY" -ge "$OMR_TRACKER_LATENCY_RECOVERY" ] && [ "$OMR_TRACKER_STATUS" = "OK" ]; then
|
||||
OMR_TRACKER_STATUS="OK"
|
||||
elif [ "$OMR_TRACKER_PREV_STATUS" = "ERROR" ] && [ "$OMR_TRACKER_STATUS" = "OK" ]; then
|
||||
if [ -n "$OMR_TRACKER_LOSS" ] && [ -n "$OMR_TRACKER_RECOVERY_LOSS" ] && [ "$OMR_TRACKER_LOSS" -ge "$OMR_TRACKER_RECOVERY_LOSS" ]; then
|
||||
OMR_TRACKER_STATUS="ERROR"
|
||||
OMR_TRACKER_STATUS_MSG="Packet loss is $OMR_TRACKER_LOSS this is more than recovery limit defined at $OMR_TRACKER_RECOVERY_LOSS"
|
||||
elif [ -n "$OMR_TRACKER_LATENCY" ] && [ -n "$OMR_TRACKER_RECOVERY_LATENCY" ] && [ "$OMR_TRACKER_LATENCY" -ge "$OMR_TRACKER_RECOVERY_LATENCY" ]; then
|
||||
OMR_TRACKER_STATUS="ERROR"
|
||||
OMR_TRACKER_STATUS_MSG="Latency is $OMR_TRACKER_LATENCY this is more than recovery limit defined at $OMR_TRACKER_RECOVERY_LATENCY"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -735,6 +735,7 @@ set_gre_tunnel() {
|
|||
|
||||
|
||||
_get_pihole() {
|
||||
[ "$(uci -q get openmptcprouter.settings.pihole_auto_conf)" = "0" ] && return
|
||||
[ -z "$vps_config" ] && vps_config=$(_get_json "config")
|
||||
[ -z "$vps_config" ] && return
|
||||
vpn="$(uci -q get openmptcprouter.settings.vpn)"
|
||||
|
@ -2054,7 +2055,9 @@ _backup_send() {
|
|||
logger -t "OMR-VPS" "Send backup file to server $servername"
|
||||
local backupjson
|
||||
backupjson='{"data": "'$backup_data'","sha256sum": "'$backup_sha256sum'"}'
|
||||
result=$(_set_json "backuppost" "$backupjson")
|
||||
echo "$backupjson" > /tmp/backupjson
|
||||
result=$(_set_json "backuppost" "@/tmp/backupjson")
|
||||
rm -f /tmp/backupjson
|
||||
uci -q set openmptcprouter.$servername.lastbackup=$(date +%s)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
if [ "$(uci -q get upnpd.config.external_ifac)" != "omrvpn" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set upnpd.config.external_iface=omrvpn
|
||||
set upnpd.config.enabled='0'
|
||||
commit upnpd
|
||||
EOF
|
||||
fi
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)
|
||||
strlcpy(hlpr->name, tmpname, sizeof(hlpr->name));
|
||||
#else
|
||||
+ strscpy(hlpr->name, tmpname, sizeof(hlpr->name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue