Signed-off-by: Stefan Schantl <[email protected]>
---
html/cgi-bin/lldp.cgi | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/html/cgi-bin/lldp.cgi b/html/cgi-bin/lldp.cgi
index 9e30faa92..194f4ec82 100644
--- a/html/cgi-bin/lldp.cgi
+++ b/html/cgi-bin/lldp.cgi
@@ -116,21 +116,21 @@ MAIN:
END
&Header::closebox();
- # Load data about all peers
- my @output = &General::system_output("lldpctl", "-f", "json0");
+ # Show a list with all peers if the service is enabled
+ if ($settings{"ENABLED"} eq "on") {
+ # Load data about all peers
+ my @output = &General::system_output("lldpctl", "-f", "json0");
- my $json;
+ my $json;
- # Parse the JSON output
- eval {
- $json = decode_json join("\n", @output);
- 1;
- } or do {
- $json = undef;
- };
+ # Parse the JSON output
+ eval {
+ $json = decode_json join("\n", @output);
+ 1;
+ } or do {
+ $json = undef;
+ };
- # Show a list with all peers if the service is enabled
- if ($settings{"ENABLED"} eq "on") {
&Header::opensection($Lang::tr{'lldp neighbors'});
# Fetch the interface object
--
2.47.3