From 6f9ae994a37b69a61040a4bc25238d7c3992cdd9 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Sat, 23 Feb 2019 12:23:48 +0100 Subject: [PATCH] sqlite3 non-interactive init --- .docker/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/init.sh b/.docker/init.sh index a090f38..1ef40d9 100644 --- a/.docker/init.sh +++ b/.docker/init.sh @@ -34,7 +34,7 @@ if [ "$ULOGGER_DB_DRIVER" = "pgsql" ]; then elif [ "$ULOGGER_DB_DRIVER" = "sqlite" ]; then mkdir -p /data/sqlite chown -R nobody:nobody /data - sqlite3 -init /var/www/html/scripts/ulogger.sqlite /data/sqlite/ulogger.db + sqlite3 -init /var/www/html/scripts/ulogger.sqlite /data/sqlite/ulogger.db .exit sqlite3 -line /data/ulogger.db "INSERT INTO users (login, password) VALUES ('admin', '\$2y\$10\$7OvZrKgonVZM9lkzrTbiou.CVhO3HjPk5y0W9L68fVwPs/osBRIMq')" sed -i "s/^\$dbdsn = .*$/\$dbdsn = \"sqlite:\/data\/sqlite\/ulogger.db\";/" /var/www/html/config.php else