summaryrefslogtreecommitdiff
path: root/templates-op/show/nhrp
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-08-11 18:53:02 +0200
committerGitHub <noreply@github.com>2020-08-11 18:53:02 +0200
commitb0e814806d528abfae7c069c554736c16059f3ce (patch)
tree898cba2a8e8c7a06e76ef8da0bf22b496c6b9aa2 /templates-op/show/nhrp
parent4f9c75a6ffee881b52dec201e31975a8af486df2 (diff)
parente8c48fa960f8809ce844b3ab320f70ae8894e2d2 (diff)
downloadvyos-nhrp-b0e814806d528abfae7c069c554736c16059f3ce.tar.gz
vyos-nhrp-b0e814806d528abfae7c069c554736c16059f3ce.zip
Merge pull request #5 from sever-sever/T2325
op-mode: T2325: Check pid file before show nhrp tunnel
Diffstat (limited to 'templates-op/show/nhrp')
-rw-r--r--templates-op/show/nhrp/interface/node.def2
-rw-r--r--templates-op/show/nhrp/tunnel/node.def2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates-op/show/nhrp/interface/node.def b/templates-op/show/nhrp/interface/node.def
index 71b9f75..c00f5e2 100644
--- a/templates-op/show/nhrp/interface/node.def
+++ b/templates-op/show/nhrp/interface/node.def
@@ -1,3 +1,3 @@
help: Show NHRP interface connection information
run:
- sudo opennhrpctl interface show || echo OpenNHRP is not running.
+ if [ -f /var/run/opennhrp.pid ]; then sudo opennhrpctl interface show; else echo OpenNHRP is not running.; fi
diff --git a/templates-op/show/nhrp/tunnel/node.def b/templates-op/show/nhrp/tunnel/node.def
index 359ed89..3d4061d 100644
--- a/templates-op/show/nhrp/tunnel/node.def
+++ b/templates-op/show/nhrp/tunnel/node.def
@@ -1,3 +1,3 @@
help: Show NHRP tunnel connection information
run:
- sudo opennhrpctl show || echo OpenNHRP is not running.
+ if [ -f /var/run/opennhrp.pid ]; then sudo opennhrpctl show ; else echo OpenNHRP is not running.; fi