commit c00bcdb0a08264ba2522d0f1503ca74a8a96843c
parent bc22228188ef41fab6cb65633d78c4c26903a2f4
Author: Joel-Haeberli <haebu@rubigen.ch>
Date: Wed, 15 May 2024 18:43:01 +0200
chore: add needed variables
Diffstat:
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,5 +1,8 @@
C2EC_HOME ?= ${HOME}
C2EC_USER ?= $(shell whoami)
+C2EC_POSTGRES_USER ?= postgres
+C2EC_POSTGRES_PASSWORD ?= postgres
+C2EC_DB_NAME ?= postgres
C2EC_DB_ADMIN_PW ?= secret
C2EC_DB_OPERATOR_PW ?= secret
C2EC_DB_API_PW ?= secret
@@ -23,6 +26,7 @@ install: dependencies-check
touch ${C2EC_HOME}/c2ec-log.txt
chmod ${C2EC_FILE_PERMISSIONS} ${C2EC_HOME}/c2ec-log.txt
chown ${C2EC_HOME}/c2ec-log.txt ${C2EC_USER}
+
echo "you may want to alter the current configuration of your installation at ${C2EC_HOME}/c2ec-config.conf"
cli: dependencies-check
diff --git a/README b/README
@@ -25,10 +25,13 @@ The following tree describes the structure of the document and a rough descripti
2. Define variables
2.1 C2EC_HOME: Everything that is installed here. (default: $HOME)
2.2 C2EC_USER: The user owning c2ec. (default: current user (whoami)
- 2.3 C2EC_DB_ADMIN_PW: The admin password of the database user
- 2.4 C2EC_DB_OPERATOR_PW: Password of the operator database user
- 2.5 C2EC_DB_API_PW: Password of the api database user
- 2.6 C2EC_FILE_PERMISSIONS: The permissions of the files created during the installation (executable, config, log, etc.)
+ 2.3 C2EC_POSTGRES_USER: The postgres username (user which is allowed to create schemes etc.)
+ 2.4 C2EC_POSTGRES_PASSWORD: The postgres users password
+ 2.5 C2EC_DB_NAME: Name of the database which shall keep the schema
+ 2.6 C2EC_DB_ADMIN_PW: The admin password of the database user
+ 2.7 C2EC_DB_OPERATOR_PW: Password of the operator database user
+ 2.8 C2EC_DB_API_PW: Password of the api database user
+ 2.9 C2EC_FILE_PERMISSIONS: The permissions of the files created during the installation (executable, config, log, etc.)
3. Execute: `make install`
## Running C2EC
diff --git a/install/wipe_db.sh b/install/wipe_db.sh
@@ -10,7 +10,7 @@ DB_PASSWORD=$2
DB_NAME=$3
SQL_SCRIPTS=(
- "./../db/drop.sql"
+ "./../c2ec/db/drop.sql"
)
execute_sql_scripts() {