Skip to content

Commit

Permalink
added possibility to create sqlite3 db using this script
Browse files Browse the repository at this point in the history
  • Loading branch information
Edmondas Girkantas committed Jul 26, 2011
1 parent c75f704 commit f5cd77a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/create_sqlite_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

DB_PATH="../db"
DB_FILE="powerdns.db"
SQLITE_BIN=sqlite # for SQLite 2.x
#SQLITE_BIN=sqlite3

# check if directory exists
if [ ! -e $DB_PATH ]
Expand All @@ -17,8 +19,8 @@ then
fi

# import db scheme and data
cat ../docs/poweradmin-sqlite-db-structure.sql | sqlite $DB_PATH/$DB_FILE
cat ../docs/powerdns-sqlite-db-structure.sql | sqlite $DB_PATH/$DB_FILE
cat ../docs/poweradmin-sqlite-db-structure.sql | $SQLITE_BIN $DB_PATH/$DB_FILE
cat ../docs/powerdns-sqlite-db-structure.sql | $SQLITE_BIN $DB_PATH/$DB_FILE

# change access rights
chmod 777 $DB_PATH
Expand Down

0 comments on commit f5cd77a

Please sign in to comment.