summaryrefslogtreecommitdiff
path: root/contrib/anastasis-dbconfig
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/anastasis-dbconfig')
-rwxr-xr-xcontrib/anastasis-dbconfig24
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/anastasis-dbconfig b/contrib/anastasis-dbconfig
index 1e682d8..952dc81 100755
--- a/contrib/anastasis-dbconfig
+++ b/contrib/anastasis-dbconfig
@@ -19,18 +19,6 @@
# Error checking on
set -eu
-if ! id postgres > /dev/null
-then
- echo "Could not find 'postgres' user. Please install Postgresql first"
- exit 1
-fi
-
-if [ "$(id -u)" -ne 0 ]
-then
- echo "This script must be run as root"
- exit 1
-fi
-
RESET_DB=0
SKIP_DBINIT=0
DBUSER="anastasis-httpd"
@@ -67,6 +55,18 @@ while getopts ':hn:rsu:' OPTION; do
esac
done
+if ! id postgres > /dev/null
+then
+ echo "Could not find 'postgres' user. Please install Postgresql first"
+ exit 1
+fi
+
+if [ "$(id -u)" -ne 0 ]
+then
+ echo "This script must be run as root"
+ exit 1
+fi
+
if [ 0 = "$SKIP_DBINIT" ]
then
if ! anastasis-dbinit -v 2> /dev/null