From: Roman Bazalevskiy Date: Sun, 19 Mar 2017 21:32:53 +0000 (+0300) Subject: Better subprocess handling X-Git-Url: https://git.rvb.name/openhab-process.git/commitdiff_plain/bb5d24ae6623bf629268bccea47ab9a2cac1aeef?ds=inline;hp=-c Better subprocess handling --- bb5d24ae6623bf629268bccea47ab9a2cac1aeef diff --git a/mqtt-bt/scan-beacons b/mqtt-bt/scan-beacons index 1709e93..34de7dc 100644 --- a/mqtt-bt/scan-beacons +++ b/mqtt-bt/scan-beacons @@ -72,11 +72,12 @@ end function open_dump() - f = assert(io.popen ("hcidump --raw")) - run_command("kill `pgrep hcitool`") - run_command("hciconfig hci0 down") - run_command("hciconfig hci0 up") - f_null = assert(io.popen ("hcitool lescan --duplicates")) + run_command("/bin/kill `/usr/bin/pgrep hcidump`") + run_command("/bin/kill `/usr/bin/pgrep hcitool`") + f = assert(io.popen ("/usr/bin/hcidump --raw")) + run_command("/usr/bin/hciconfig hci0 down") + run_command("/usr/bin/hciconfig hci0 up") + f_null = assert(io.popen ("/usr/bin/hcitool lescan --duplicates")) return f