town db scripting

Esse commit está contido em:
vilmibm 2023-03-06 03:07:35 +00:00
commit c4c02533e7
2 arquivos alterados com 12 adições e 0 exclusões

12
scripts/reset_town_db.sh Arquivo executável
Ver arquivo

@ -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"