[med-svn] [conquest-dicom-server] 07/08: Add a README for database setting up.

Pablo Lorenzzoni spectra at moszumanska.debian.org
Mon Mar 31 18:32:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

spectra pushed a commit to branch master
in repository conquest-dicom-server.

commit 81be0be7881526abcddeab31ec0503631f6279f4
Author: Pablo Lorenzzoni <spectra at debian.org>
Date:   Sun Mar 30 14:19:48 2014 +0000

    Add a README for database setting up.
---
 debian/README.databases                 | 49 +++++++++++++++++++++++++++++++++
 debian/conquest-common.docs             |  2 +-
 debian/conquest-dicom-server.dgate.init |  4 +--
 debian/conquest-dicom-server.postinst   |  6 ++--
 4 files changed, 55 insertions(+), 6 deletions(-)

diff --git a/debian/README.databases b/debian/README.databases
new file mode 100644
index 0000000..d539e2c
--- /dev/null
+++ b/debian/README.databases
@@ -0,0 +1,49 @@
+Information on ConQuest database backends
+-----------------------------------------
+
+(1) File-based databases:
+-------------------------
+The file-based database variants (conquest-dbase and conquest-sqlite) are
+ready to run right after installation. They come with DGATE_ENABLE set to
+true in /etc/default/dgate. 
+
+For dbase, the database files are under /var/lib/conquest-dicom-server/dbase
+directory with extension .DBF. The schema for those files are at
+/etc/conquest-dicom-server/dicom.sql, but just mess with that file if you
+really know what you're doing. The path can be changed editing SQLServer
+variable at /etc/conquest-dicom-server/dicom.ini file, but the filenames are
+inflexible.
+
+For sqlite, the database is a single file under the same directory called
+conquest.sqlite. The path and filename can be changed by editing SQLServer
+variable at /etc/conquest-dicom-server/dicom.ini.
+
+(2) Server-based databases:
+---------------------------
+The server-based database variants (conquest-mysql and conquest-postgres) are
+disabled right after installation (i.e. they come with DGATE_ENABLE set to
+false in /etc/default/dgate file).
+
+You'll need to set up a database and configure it properly in
+/etc/conquest-dicom-server/dicom.ini before setting DGATE_ENABLE to true.
+relevant variables in configuration file are interpreted as follows:
+
+(2.1) SQLHost: database address (e.g. 127.0.0.1)
+(2.2) SQLServer: database name (e.g. conquest)
+(2.3) Username: user allowed to modify given database (e.g. conquest_user)
+(2.4) Password: user's password (e.g hackme)
+
+Once this has been configured, you just have to run /etc/init.d/dgate regen
+to set it up. This is what should be done for MySQL, for instance:
+
+bash$ mysql -u root -p
+mysql> create database conquest;
+mysql> grant all privileges on conquest.* to conquest_user identified by
+       "hackme";
+mysql> flush privileges;
+mysql> \q
+bash$ sudo vi /etc/conquest-dicom-server/dicom.ini (set thing accordingly)
+bash$ sudo vi /etc/default/dgate (set DGATE_ENABLE to true)
+bash$ sudo invoke-rc.d dgate regen
+bash$ sudo invoke-rc.d dgate start
+
diff --git a/debian/conquest-common.docs b/debian/conquest-common.docs
index 2bc350d..bba2e47 100644
--- a/debian/conquest-common.docs
+++ b/debian/conquest-common.docs
@@ -1,4 +1,4 @@
 linuxmanual.pdf
 windowsmanual.pdf
 DicomConformance_FilesLST_Changes.pdf
-README.*
+debian/README.*
diff --git a/debian/conquest-dicom-server.dgate.init b/debian/conquest-dicom-server.dgate.init
index 283d808..a3bcbff 100755
--- a/debian/conquest-dicom-server.dgate.init
+++ b/debian/conquest-dicom-server.dgate.init
@@ -52,8 +52,8 @@ fi
 
 # Does not run if not enabled in default file
 if ! $DGATE_ENABLE; then
-    echo "You must enable daemon at /etc/default/$NAME. Aborting" >&2
-    exit 1
+    echo "You must enable daemon at /etc/default/$NAME. Exiting" >&2
+    exit
 fi
 
 #
diff --git a/debian/conquest-dicom-server.postinst b/debian/conquest-dicom-server.postinst
index 40ce4d1..e3c8176 100644
--- a/debian/conquest-dicom-server.postinst
+++ b/debian/conquest-dicom-server.postinst
@@ -3,7 +3,7 @@
 set -e
 
 PACKAGE=conquest-dicom-server
-SCRIPTNAME=dgate
+NAME=dgate
 USER=_conquest
 GROUP=_conquest
 ETCDIR=/etc/$PACKAGE
@@ -27,9 +27,9 @@ create_user_group() {
 setup_db() {
   echo "We'll regenerate the database..."
   if which invoke-rc.d >/dev/null 2>&1; then
-    invoke-rc.d $SCRIPTNAME regen
+    invoke-rc.d $NAME regen
   else
-    /etc/init.d/$SCRIPTNAME regen
+    /etc/init.d/$NAME regen
   fi
   echo -e "\n\nIf it's the first time you install $PACKAGE, disregard any" \
           "error messages about absent database tables."

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/conquest-dicom-server.git



More information about the debian-med-commit mailing list