stevejenkins / unifi-linux-utils

Helpful Linux / Unix scripts for admins of Ubiquiti (UBNT) UniFi wireless products
https://www.stevejenkins.com/blog/tag/unifi/
MIT License
695 stars 127 forks source link

Should quote filenames used in tests to avoid empty case #34

Closed jjlawren closed 5 years ago

jjlawren commented 5 years ago

If variables used in tests for file existence are empty, they can lead to false positives. For example, commenting out SIGNED_CERT in the default script will cause if [ -f $SIGNED_CERT] to return true. Adding quotes around the variable avoids this issue.