From 95c9fb9bf030984cd6846816f6a87802a80f952f Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Mon, 3 Jun 2024 14:24:44 +0200 Subject: [PATCH] Suppression script inutile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Script d'initialisation de base de données non utilisé dans ScoDoc9 --- tools/initialize_database.sh | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100755 tools/initialize_database.sh diff --git a/tools/initialize_database.sh b/tools/initialize_database.sh deleted file mode 100755 index ac7ba3440..000000000 --- a/tools/initialize_database.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Initialize database (create tables) for a ScoDoc instance -# This script must be executed as user scodoc -# -# $db_name and $DEPT passed as environment variables - -# Le répertoire de ce script: -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -source "$SCRIPT_DIR/config.sh" -source "$SCRIPT_DIR/utils.sh" - -if [ "$(id -nu)" != "$SCODOC_USER" ] -then - echo "$0: script must be runned as user $SCODOC_USER" - exit 1 -fi - -# shellcheck disable=SC2154 -echo 'Initializing tables in database ' "$db_name" -$PSQL -U "$POSTGRES_USER" -p "$POSTGRES_PORT" "$db_name" -f "$SCODOC_DIR"/misc/createtables.sql - - -# Set DeptName in preferences: -echo "insert into sco_prefs (name, value) values ('DeptName', '"${DEPT}\'\) | $PSQL -U "$POSTGRES_USER" -p "$POSTGRES_PORT" "$db_name"