diff options
| author | Christian Poessinger <christian@poessinger.com> | 2021-08-21 08:25:15 +0200 | 
|---|---|---|
| committer | Christian Poessinger <christian@poessinger.com> | 2021-08-21 08:52:43 +0200 | 
| commit | aa58d5c58edef40619192d11b0dcafc36b1e5d89 (patch) | |
| tree | a2298bcf84e1c382764227472247fe981af21765 | |
| parent | b0d9eb23747c94bd99bffaad1827f8a234cadb8b (diff) | |
| download | vyos-1x-aa58d5c58edef40619192d11b0dcafc36b1e5d89.tar.gz vyos-1x-aa58d5c58edef40619192d11b0dcafc36b1e5d89.zip | |
op-mode: nhrp: T3599: check if process is running instead of checking PID file
| -rw-r--r-- | op-mode-definitions/nhrp.xml.in | 4 | 
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> | 
