1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Restart omr-bypass only if not init script running

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-04-02 15:46:50 +02:00
parent 1ad7574054
commit 9828e5a93e

View file

@ -1344,7 +1344,7 @@ if [ -n "$(logread | tail -n 2 | grep 'Ring expansion failed')" ]; then
echo 1 > /sys/bus/pci/rescan
fi
if [ "$(iptables-save | grep omr-bypass)" = "" ]; then
if [ "$(iptables-save | grep omr-bypass)" = "" ] && [ "$(pgrep omr-bypass)" = "" ]; then
_log "Can't find omr-bypass rules, restart omr-bypass..."
/etc/init.d/omr-bypass
fi