Add arguemt usage to cmd option in ambsens.

This commit is contained in:
Andreas Bachlechner 2021-09-24 11:15:43 +02:00
parent 41c14beba6
commit b8f9d73a94
1 changed files with 3 additions and 2 deletions

View File

@ -145,11 +145,12 @@ sub ambsens_update {
my $e2 = 1;
foreach my $dl (split(',', $ambsens->{desc}->{$e})) {
my $str = trim($dl);
my $script = trim($ambsens->{cmd}->{$str});
my $scriptWithArguments = trim($ambsens->{cmd}->{$str});
my $script = (split(' ', $scriptWithArguments))[0];
if($script) {
if(-x $script) {
my $val = `$script`;
my $val = `$scriptWithArguments`;
chomp($val);
$sens[$e][$e2] = $val;