Updated Home (markdown)

Meliox 2024-05-27 21:55:13 +02:00
parent f931e9a80f
commit 166686bed0

14
Home.md

@ -6,15 +6,13 @@ Welcome to the PVE-mods wiki!
In /usr/share/perl5/PVE/API2/Nodes.pm In /usr/share/perl5/PVE/API2/Nodes.pm
Replace Replace
$res->{sensorsOutput} `$res->{sensorsOutput}`
with with
my $json_file_path = '/tmp/sensordata.json'; # Ensure this path is correct and file has chmod 777` `my $json_file_path = '/tmp/sensordata.json'; # Ensure this path is correct
`# Read JSON data from the file` # Read JSON data from the file
`open my $fh, '<', $json_file_path or die "Cannot open $json_file_path: $!";` open my $fh, '<', $json_file_path or die "Cannot open $json_file_path: $!";
`my $json_text = do { local $/; <$fh> };` my $json_text = do { local $/; <$fh> };
`close $fh;` close $fh;`
`$res->{sensorsOutput} = $json_text;