From 543a11a2297d15e887b72952a4904b049fe5c9b0 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 7 Apr 2021 18:17:25 +0200 Subject: [PATCH] Restart miniupnpd if crashed --- mptcp/files/usr/share/omr/post-tracking.d/post-tracking | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking index 4abf98d77..30a402bb1 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -1297,6 +1297,11 @@ if [ "$(pgrep v2ray)" = "" ] && [ "$(uci -q get v2ray.main.enabled)" = "1" ] && /etc/init.d/v2ray restart sleep 5 fi +if [ "$(pgrep miniupnpd)" = "" ] && [ "$(uci -q get upnpd.config.enabled)" = "1" ] && [ -f /etc/init.d/miniupnpd ]; then + _log "Can't find miniupnpd, restart it..." + /etc/init.d/miniupnpd restart + sleep 5 +fi if [ "$(pgrep rpcd)" = "" ] && [ -f /etc/init.d/rpcd ]; then _log "Can't find rpcd, restart it..."