mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Restart unbound if needed
This commit is contained in:
parent
789f70489b
commit
cb129b6c3d
1 changed files with 8 additions and 0 deletions
|
@ -547,6 +547,9 @@ fi
|
||||||
[ -z "$download" ] && download="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.download)"
|
[ -z "$download" ] && download="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.download)"
|
||||||
upload="$(uci -q get network.$OMR_TRACKER_INTERFACE.uploadspeed)"
|
upload="$(uci -q get network.$OMR_TRACKER_INTERFACE.uploadspeed)"
|
||||||
[ -z "$upload" ] && upload="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.upload)"
|
[ -z "$upload" ] && upload="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.upload)"
|
||||||
|
if [ "$(uci show | grep mptcpr)" = "" ]; then
|
||||||
|
touch /etc/config/openmptcprouter
|
||||||
|
fi
|
||||||
if [ "$(pgrep glorytun-udp)" != "" ] && ([ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP)" = "" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $13}')" = "0" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $16}')" = "0" ]); then
|
if [ "$(pgrep glorytun-udp)" != "" ] && ([ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP)" = "" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $13}')" = "0" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $16}')" = "0" ]); then
|
||||||
if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then
|
if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then
|
||||||
if [ "$(uci -q get glorytun.vpn.rateauto)" = "1" ]; then
|
if [ "$(uci -q get glorytun.vpn.rateauto)" = "1" ]; then
|
||||||
|
@ -741,6 +744,11 @@ if [ "$(pgrep glorytun)" = "" ] && [ "$(uci -q get glorytun.vpn.enable)" = "1" ]
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(pgrep unbound)" = "" ] && [ -f /etc/init.d/unbound ] && [ "$(uci -q get unbound.@unbound[0].enabled)" = "1" ]; then
|
||||||
|
/etc/init.d/unbound restart
|
||||||
|
sleep 5
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$(pgrep openvpn)" = "" ] && [ -f /etc/init.d/openvpn ]; then
|
if [ "$(pgrep openvpn)" = "" ] && [ -f /etc/init.d/openvpn ]; then
|
||||||
openvpn_enable=0
|
openvpn_enable=0
|
||||||
openvpn_enabled() {
|
openvpn_enabled() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue