diff --git a/73_PRESENCE.pm b/73_PRESENCE.pm index 6698fb9..1cb74d7 100755 --- a/73_PRESENCE.pm +++ b/73_PRESENCE.pm @@ -1,4 +1,4 @@ -# $Id: 73_PRESENCE.pm 20782 2019-12-19 10:51:06Z markusbloch $ +# $Id: 73_PRESENCE.pm 20782 2019-12-19 10:51:06Z markusbloch $ ############################################################################## # # 73_PRESENCE.pm @@ -51,6 +51,7 @@ PRESENCE_Initialize($) "disabledForIntervals ". "fritzboxCheckSpeed:0,1 ". "pingCount:1,2,3,4,5,6,7,8,9,10 ". + "pingPerSUDO:0,1 ". "bluetoothHciDevice ". "absenceThreshold ". "presenceThreshold ". @@ -778,6 +779,7 @@ sub PRESENCE_DoLocalPingScan($) my $retcode; my $return; my $temp; + my $pingCmd = (AttrVal($name,'pingPerSUDO',0) == 1 ? 'sudo ping' : 'ping'); $SIG{CHLD} = 'IGNORE'; @@ -814,7 +816,7 @@ sub PRESENCE_DoLocalPingScan($) } else { - $temp = qx(ping -c $count $device 2>&1); + $temp = qx($pingCmd -c $count $device 2>&1); if(defined($temp) and $temp ne "") { @@ -2119,3 +2121,4 @@ Options: =end html_DE =cut +