DylanPiercey / local-devices

🔮 Find devices connected to the current local network.
MIT License
140 stars 27 forks source link

Linux crontab can't find arp #39

Closed tomascardososerra closed 2 years ago

tomascardososerra commented 3 years ago

My solution was to change these 2 lines in \local-devices\src\index.js lines 105 and 145

105 original: return cp.exec('arp -a', options).then(parseAll) new: return cp.exec('/usr/sbin/arp -a', options).then(parseAll)

145 original: return cp.exec('arp -n ' + address, options).then(parseOne) new: return cp.exec('/usr/sbin/arp -n ' + address, options).then(parseOne)

I'm guessing this was a simplistic approach and will not work on different OS

DylanPiercey commented 2 years ago

You can now pass in a custom arpPath option to configure this.