mirror of
https://github.com/librenms/docker.git
synced 2026-07-17 16:45:25 +00:00
Enable the First Run Wizard (#280)
Use the first run wizard instead of creating an admin user with a known password.
This commit is contained in:
parent
ee333d4357
commit
7cf09447a5
2 changed files with 8 additions and 11 deletions
|
|
@ -243,15 +243,11 @@ $ docker run -d -p 8000:8000 --name librenms \
|
|||
|
||||
### First launch
|
||||
|
||||
On first launch, an initial administrator user will be created:
|
||||
|
||||
| Login | Password |
|
||||
|------------|------------|
|
||||
| `librenms` | `librenms` |
|
||||
When you first access the webui, you will be prompted to create an admin user.
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> You can create another one using the [`lnms` command](#lnms-command).
|
||||
> If you lose access, you can create another one using the [`lnms` command](#lnms-command).
|
||||
|
||||
## Upgrade
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,13 @@ while ! ${dbcmd} -e "show databases;" >/dev/null 2>&1; do
|
|||
fi
|
||||
done
|
||||
echo "Database ready!"
|
||||
|
||||
# Enable first run wizard if db is empty
|
||||
counttables=$(echo 'SHOW TABLES' | ${dbcmd} "$DB_NAME" | wc -l)
|
||||
if [ "${counttables}" -eq "0" ]; then
|
||||
echo "Enabling First Run Wizard..."
|
||||
echo "INSTALL=user,finish">> ${LIBRENMS_PATH}/.env
|
||||
fi
|
||||
|
||||
echo "Updating database schema..."
|
||||
lnms migrate --force --no-ansi --no-interaction
|
||||
|
|
@ -79,11 +85,6 @@ echo "Clear cache"
|
|||
artisan cache:clear --no-interaction
|
||||
artisan config:cache --no-interaction
|
||||
|
||||
if [ "${counttables}" -eq "0" ]; then
|
||||
echo "Creating admin user..."
|
||||
lnms user:add --password=librenms --email=librenms@librenms.docker --role=admin --no-ansi --no-interaction librenms
|
||||
fi
|
||||
|
||||
mkdir -p /etc/services.d/nginx
|
||||
cat >/etc/services.d/nginx/run <<EOL
|
||||
#!/usr/bin/execlineb -P
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue