aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-05-28 21:10:29 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-05-28 21:10:29 +0200
commit16ee10eb5093a5b324782e1bd3ac01b75009f8f7 (patch)
tree9a5354492542938c8186ff4ea3abd907237477cb
parent2f55027b9b69dc21c59d7d1fe90c5e56eea7908b (diff)
download0tdns-16ee10eb5093a5b324782e1bd3ac01b75009f8f7.tar.gz
0tdns-16ee10eb5093a5b324782e1bd3ac01b75009f8f7.zip
add postgres database creation script
-rwxr-xr-xsetup_postgres.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/setup_postgres.sh b/setup_postgres.sh
new file mode 100755
index 0000000..f026645
--- /dev/null
+++ b/setup_postgres.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+echo "Creating 'ztdns' role"
+sudo -u postgres createuser --no-createdb --no-createrole \
+ --no-superuser --pwprompt ztdns
+
+echo "Creating 'ztdns' database"
+sudo -u postgres createdb -O ztdns ztdns