town/scripts/reset_town_db.sh

13 lines
213 B
Bash
Executable File

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