#!/bin/sh
#
# shell script to create Bacula SQLite tables

bindir=@SQLITE_BINDIR@
PATH=$bindir:$PATH
cd @working_dir@
db_name=@db_name@

sqlite3 $* ${db_name}.db <<END-OF-DATA
.databases
END-OF-DATA
# Allow non root access
chown @dir_user@:@dir_group@ ${db_name}.db
chmod 0640 ${db_name}.db
exit 0
