summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-21 08:25:15 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-21 08:52:43 +0200
commitaa58d5c58edef40619192d11b0dcafc36b1e5d89 (patch)
treea2298bcf84e1c382764227472247fe981af21765 /op-mode-definitions
parentb0d9eb23747c94bd99bffaad1827f8a234cadb8b (diff)
downloadvyos-1x-aa58d5c58edef40619192d11b0dcafc36b1e5d89.tar.gz
vyos-1x-aa58d5c58edef40619192d11b0dcafc36b1e5d89.zip
op-mode: nhrp: T3599: check if process is running instead of checking PID file
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/nhrp.xml.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/op-mode-definitions/nhrp.xml.in b/op-mode-definitions/nhrp.xml.in
index 9e746cc35..89508e2be 100644
--- a/op-mode-definitions/nhrp.xml.in
+++ b/op-mode-definitions/nhrp.xml.in
@@ -50,13 +50,13 @@
<properties>
<help>Show NHRP interface connection information</help>
</properties>
- <command>if [ -f /var/run/opennhrp.pid ]; then sudo opennhrpctl interface show; else echo OpenNHRP is not running.; fi</command>
+ <command>if pgrep opennhrp >/dev/null; then sudo opennhrpctl interface show; else echo OpenNHRP is not running; fi</command>
</leafNode>
<leafNode name="tunnel">
<properties>
<help>Show NHRP tunnel connection information</help>
</properties>
- <command>if [ -f /var/run/opennhrp.pid ]; then sudo opennhrpctl show ; else echo OpenNHRP is not running.; fi</command>
+ <command>if pgrep opennhrp >/dev/null; then sudo opennhrpctl show ; else echo OpenNHRP is not running; fi</command>
</leafNode>
</children>
</node>