Files
qgreper/init_sqlite.sh
David Hoppenbrouwers f73f2b405c Add configuration table
2022-10-09 12:27:59 +02:00

29 lines
366 B
Bash
Executable File

#!/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
);"