Lint with shellcheck (#12666)

This commit is contained in:
Jellyfrog
2021-03-28 17:47:21 +02:00
committed by GitHub
parent f06e81b357
commit f9b25ccdbc
3 changed files with 7 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ COMPOSER="php ${LIBRENMS_DIR}/scripts/composer_wrapper.php --no-interaction"
LOG_DIR=$(php -r "@include '${LIBRENMS_DIR}/config.php'; echo isset(\$config['log_dir']) ? \$config['log_dir'] : '${LIBRENMS_DIR}/logs';")
# get the librenms user
# shellcheck source=/opt/librenms/.env
# shellcheck source=.env.example
source "${LIBRENMS_DIR}/.env"
LIBRENMS_USER="${LIBRENMS_USER:-librenms}"
LIBRENMS_USER_ID=$(id -u "$LIBRENMS_USER")
@@ -74,7 +74,7 @@ status_run() {
if [[ "${arg_option}" == "update" ]]; then
php "${LIBRENMS_DIR}/daily.php" -f notify -o "${tmp}"
fi
if [[ ! -z "${tmp}" ]]; then
if [[ -n "${tmp}" ]]; then
# print output in case of failure
echo "${tmp}"
fi