summaryrefslogtreecommitdiff
path: root/src/op_mode/snmp_v3_showcerts.sh
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-06-10 18:06:27 +0200
committerChristian Poessinger <christian@poessinger.com>2018-06-14 21:12:13 +0200
commita6c5fe6ea239fccb7769f9d9977f133161c58da4 (patch)
treedafdba37613afe9cdd3c9c5cb030ff236044dd98 /src/op_mode/snmp_v3_showcerts.sh
parent59db66e83687f52496027197e5b988d17371f651 (diff)
downloadvyos-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-xsrc/op_mode/snmp_v3_showcerts.sh8
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