use string comparison

This commit is contained in:
colemamd 2020-06-18 19:19:23 -04:00
parent 7bd99e2d39
commit f01f321cfe
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ iocage exec "${1}" sysrc unifi_enable=YES
iocage exec "${1}" service unifi start
# shellcheck disable=SC2154
if [ "${!POLLER}" = true ]; then
if [ "${!POLLER}" == true ]; then
# Check if influxdb container exists, create unifi database if it does, error if it is not.
echo "Checking if the database jail and database exist..."
if [[ -d /mnt/"${global_dataset_iocage}"/jails/"${!DB_JAIL}" ]]; then

View File

@ -5,7 +5,7 @@
POLLER="jail_${1}_unifi_poller"
# shellcheck disable=SC2154
if [ "${!POLLER}" = true ]; then
if [ "${!POLLER}" == true ]; then
FILE_NAME=$(curl -s https://api.github.com/repos/unifi-poller/unifi-poller/releases/latest | jq -r ".assets[] | select(.name | contains(\"amd64.txz\")) | .name")
DOWNLOAD=$(curl -s https://api.github.com/repos/unifi-poller/unifi-poller/releases/latest | jq -r ".assets[] | select(.name | contains(\"amd64.txz\")) | .browser_download_url")