Add configuration table

This commit is contained in:
David Hoppenbrouwers
2022-10-09 12:27:59 +02:00
parent e3af03bbac
commit f73f2b405c
10 changed files with 227 additions and 56 deletions

28
init_sqlite.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
SQLITE=sqlite3
set -e
if [ $# != 1 ]
then
echo "Usage: $0 <file>" >&2
exit 1
fi
$SQLITE $1 -init schema.txt "insert into config (
version,
name,
description,
secret_key,
captcha_key,
registration_enabled
)
values (
'agrepy-v0.1',
'Agrepy',
'',
'$(head -c 30 /dev/urandom | base64)',
'$(head -c 30 /dev/urandom | base64)',
0
);"