aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/taler-auditor-dbconfig24
-rwxr-xr-xcontrib/taler-exchange-dbconfig24
2 files changed, 24 insertions, 24 deletions
diff --git a/contrib/taler-auditor-dbconfig b/contrib/taler-auditor-dbconfig
index c1ef69544..16437d68c 100755
--- a/contrib/taler-auditor-dbconfig
+++ b/contrib/taler-auditor-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="taler-auditor-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 ! taler-auditor-dbinit -v 2> /dev/null
diff --git a/contrib/taler-exchange-dbconfig b/contrib/taler-exchange-dbconfig
index efa4247e9..4be0fef7d 100755
--- a/contrib/taler-exchange-dbconfig
+++ b/contrib/taler-exchange-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="taler-exchange-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 ! taler-exchange-dbinit -v 2> /dev/null