mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
Check if omr-bypass rules are set, if not restart
This commit is contained in:
parent
18565f869f
commit
f8495c7cf1
1 changed files with 5 additions and 0 deletions
|
@ -848,6 +848,11 @@ if [ -n "$(logread | tail -n 2 | grep 'Ring expansion failed')" ]; then
|
||||||
echo 1 > /sys/bus/pci/rescan
|
echo 1 > /sys/bus/pci/rescan
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(iptables-save | grep omr-bypass)" = "" ]; then
|
||||||
|
_log "Can't find omr-bypass rules, restart omr-bypass..."
|
||||||
|
/etc/init.d/omr-bypass
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]); then
|
if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]); then
|
||||||
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
|
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
Loading…
Reference in a new issue