1
0
Fork 0
mirror of https://github.com/librenms/docker.git synced 2026-01-23 10:15:22 +00:00

Coding style

This commit is contained in:
CrazyMax 2018-11-18 17:08:50 +01:00
parent f393bec0cc
commit 8fb36fbb16
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
2 changed files with 4 additions and 4 deletions

View file

@ -89,11 +89,11 @@ RUN mkdir -p /opt \
&& adduser -u 1000 -G librenms -h ${LIBRENMS_PATH} -s /bin/sh -D librenms \
&& passwd -l librenms \
&& usermod -a -G librenms nginx \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \
&& curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \
&& git clone --branch ${LIBRENMS_VERSION} https://github.com/librenms/librenms.git ${LIBRENMS_PATH} \
&& chown -R librenms. ${LIBRENMS_PATH} \
&& su - librenms -c "composer install --no-dev --no-interaction --no-ansi --working-dir=${LIBRENMS_PATH}" \
&& wget -q https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro -O /usr/bin/distro \
&& curl -sSLk -q https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro -o /usr/bin/distro \
&& chmod +x /usr/bin/distro \
&& rm -rf /tmp/*

View file

@ -135,7 +135,7 @@ cat > ${LIBRENMS_PATH}/config.d/database.php <<EOL
\$config['db_pass'] = '${DB_PASSWORD}';
\$config['db_name'] = '${DB_NAME}';
EOL
dbcmd="mysql -h ${DB_HOST} -P ${DB_PORT} -u "${DB_USER}" "-p${DB_PASSWORD}""
dbcmd="mysql -h ${DB_HOST} -P ${DB_PORT} -u \"${DB_USER}\" \"-p${DB_PASSWORD}\""
unset DB_PASSWORD
# Config : User
@ -296,7 +296,7 @@ else
counter=1
while ! ${dbcmd} -e "show databases;" > /dev/null 2>&1; do
sleep 1
counter=`expr $counter + 1`
counter=$((counter + 1))
if [ ${counter} -gt ${DB_TIMEOUT} ]; then
>&2 echo "ERROR: Failed to connect to database on $DB_HOST"
exit 1