diff --git a/scripts/reset_town_db.sh b/scripts/reset_town_db.sh new file mode 100755 index 0000000..c02cb9c --- /dev/null +++ b/scripts/reset_town_db.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +dbpath="/town/var/town.db" +srcpath="/town/src/town" + +rm -f "$dbpath" +sqlite3 < "${srcpath}/sql/create_town_db.sql" "$dbpath" +chown root:admin "$dbpath" +chmod o-r "$dbpath" +chmod g+w "$dbpath" diff --git a/sql/create_towndb.sql b/sql/create_town_db.sql similarity index 100% rename from sql/create_towndb.sql rename to sql/create_town_db.sql