diff options
author | Christian Poessinger <christian@poessinger.com> | 2018-06-14 21:12:58 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2018-06-14 21:12:58 +0200 |
commit | e98c53f7c1ba846b3d27eceec1d7c2789c3a5b04 (patch) | |
tree | 11f095b28100eadb3052f5ac4d191e106a6e8096 /src/op_mode/snmp_v3_showcerts.sh | |
parent | 81db9345d117748a89059d2819b36b07ebdf708f (diff) | |
parent | a6c5fe6ea239fccb7769f9d9977f133161c58da4 (diff) | |
download | vyos-1x-e98c53f7c1ba846b3d27eceec1d7c2789c3a5b04.tar.gz vyos-1x-e98c53f7c1ba846b3d27eceec1d7c2789c3a5b04.zip |
Merge branch 'snmp-op-mode' into current
* snmp-op-mode:
T683: Initial version for SNMP op mode command definition in XML
Diffstat (limited to 'src/op_mode/snmp_v3_showcerts.sh')
-rwxr-xr-x | src/op_mode/snmp_v3_showcerts.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/op_mode/snmp_v3_showcerts.sh b/src/op_mode/snmp_v3_showcerts.sh new file mode 100755 index 000000000..015b2e662 --- /dev/null +++ b/src/op_mode/snmp_v3_showcerts.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +files=`sudo ls /etc/snmp/tls/certs/ 2> /dev/null`; +if [ -n "$files" ]; then + sudo /usr/bin/net-snmp-cert showcerts --subject --fingerprint +else + echo "You don't have any certificates. Put it in '/etc/snmp/tls/certs/' folder." +fi |