tariqbuilds / linux-dash

A beautiful web dashboard for Linux
https://afaqurk.github.io/linux-dash/
MIT License
10.43k stars 1.2k forks source link

General cleanup for the linux_json_api.sh #439

Closed zmrow closed 7 years ago

zmrow commented 7 years ago

Hardcoded paths make me shudder. :). I did a little general cleanup and plan on doing a bit more.

Also, there was a mixed bag of which and command -v. Which can be a bit flaky depending on where you're running it. command -v is POSIX compliant but since your shebang is /bin/bash I used type -P

tariqbuilds commented 7 years ago

This is an excellent PR. Very hard to say no to cleaner, more reliable code.

Thank you.