diff options
author | Christian Poessinger <christian@poessinger.com> | 2018-06-10 18:06:27 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2018-06-14 21:12:13 +0200 |
commit | a6c5fe6ea239fccb7769f9d9977f133161c58da4 (patch) | |
tree | dafdba37613afe9cdd3c9c5cb030ff236044dd98 /src/op_mode/snmp_v3_showcerts.sh | |
parent | 59db66e83687f52496027197e5b988d17371f651 (diff) | |
download | vyos-1x-a6c5fe6ea239fccb7769f9d9977f133161c58da4.tar.gz vyos-1x-a6c5fe6ea239fccb7769f9d9977f133161c58da4.zip |
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 |