mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-15 17:08:19 +01:00
Update 99-run.sh
This commit is contained in:
@@ -11,6 +11,13 @@ exec redis-server & bashio::log.info "Starting redis"
|
||||
###############################
|
||||
# Origin : https://github.com/linuxserver/docker-paperless-ngx/blob/main/root/etc/cont-init.d/99-migrations
|
||||
|
||||
# Store last line
|
||||
LASTLINE="$(ls -ltr | sed '$!d' /usr/local/bin/paperless_cmd.sh)"
|
||||
|
||||
# Delete last line
|
||||
sed -i '$d' /usr/local/bin/paperless_cmd.sh
|
||||
|
||||
# Append user creation
|
||||
echo "# Creating user admin
|
||||
cat << EOF | python3 manage.py shell
|
||||
from django.contrib.auth import get_user_model
|
||||
@@ -26,4 +33,7 @@ if len(UserModel.objects.all()) == 1:
|
||||
user.save()
|
||||
EOF" >> /usr/local/bin/paperless_cmd.sh
|
||||
|
||||
# Restore last line
|
||||
echo "$LASTLINE" >> /usr/local/bin/paperless_cmd.sh
|
||||
|
||||
bashio::log.info "Initial username and password are admin. Please change in the administration panel of the webUI after login."
|
||||
|
||||
Reference in New Issue
Block a user