mirror of
https://github.com/librenms/docker.git
synced 2026-01-23 10:15:22 +00:00
Coding style
This commit is contained in:
parent
f393bec0cc
commit
8fb36fbb16
2 changed files with 4 additions and 4 deletions
|
|
@ -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/*
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue