diff options
Diffstat (limited to 'templates/restart/snmp')
-rw-r--r-- | templates/restart/snmp/node.def | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/restart/snmp/node.def b/templates/restart/snmp/node.def new file mode 100644 index 0000000..689b035 --- /dev/null +++ b/templates/restart/snmp/node.def @@ -0,0 +1,12 @@ +help: Restart SNMP service + +run: + if cli-shell-api existsActive service snmp; then + echo "Restarting SNMP..." + sudo /opt/vyatta/sbin/vyatta-snmp.pl --restart-snmp; + if [[ $? -eq 0 ]]; then + echo "Success!" + fi + else + echo "SNMP is not configured" + fi |