autotasker/init_db.sh

11 lines
335 B
Bash
Raw Normal View History

2024-08-02 14:39:21 +00:00
#!/bin/sh
DEFAULT_DB_PATH="/var/lib/autotasker/autotasker.db"
DEFAULT_MIGRATION_PATH="/usr/local/src/autotasker/migrations/all.sql"
DB_PATH="${DB_PATH:-$DEFAULT_DB_PATH}"
MIGRATION_PATH="${MIGRATION_PATH:-$DEFAULT_MIGRATION_PATH}"
2024-08-02 17:40:14 +00:00
echo "Initializing db at $DB_PATH from schema at $MIGRATION_PATH"
2024-08-02 14:39:21 +00:00
sqlite3 $DB_PATH < $MIGRATION_PATH