File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ define Package/ns-plug/install
7373 $(INSTALL_DIR ) $(1 ) /usr/libexec/mwan-hooks
7474 $(INSTALL_BIN ) ./files/ns-plug.init $(1 ) /etc/init.d/ns-plug
7575 $(INSTALL_BIN ) ./files/ns-plug $(1 ) /usr/sbin/ns-plug
76+ $(INSTALL_BIN ) ./files/restart-ns-plug $(1 ) /usr/sbin/restart-ns-plug
7677 $(INSTALL_BIN ) ./files/distfeed-setup $(1 ) /usr/sbin/distfeed-setup
7778 $(INSTALL_BIN ) ./files/remote-backup $(1 ) /usr/sbin
7879 $(INSTALL_BIN ) ./files/send-backup $(1 ) /usr/sbin
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ #
4+ # Copyright (C) 2024 Nethesis S.r.l.
5+ # SPDX-License-Identifier: GPL-2.0-only
6+ #
7+
8+ # Restart the ns-plug service when tun-nsplug goes down
9+
10+ # the service can take a while to stop
11+ if /etc/init.d/ns-plug status ; then
12+ sleep 30
13+ fi
14+
15+ # Check if the service is NOT running
16+ if ! /etc/init.d/ns-plug status ; then
17+ exit 0
18+ fi
19+
20+ # Restart the service
21+ /etc/init.d/ns-plug restart
You can’t perform that action at this time.
0 commit comments