diff contrib/make_flys_release/make_release.sh @ 6225:0aa9c5d8dccb

Switch default seddb to postgres and handle the configuration
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 06 Jun 2013 17:33:47 +0200
parents 8f129977e76e
children 47f4d2c1866a
line wrap: on
line diff
--- a/contrib/make_flys_release/make_release.sh	Thu Jun 06 17:29:24 2013 +0200
+++ b/contrib/make_flys_release/make_release.sh	Thu Jun 06 17:33:47 2013 +0200
@@ -72,10 +72,10 @@
 
 # Seddb Configuration
 SEDDBURL=${SEDDBURL:-czech-republic.atlas.intevation.de}
-SEDDBPORT=${SEDDBPORT:-1521}
-SEDDBBACK=${SEDDBBACK:-XE}
-SEDDBUSER=${SEDDBUSER:-seddb}
-SEDDBPASS=${SEDDBPASS:-seddbpass}
+SEDDBPORT=${SEDDBPORT:-5432}
+SEDDBBACK=${SEDDBBACK:-seddb}
+SEDDBUSER=${SEDDBUSER:-flys}
+SEDDBPASS=${SEDDBPASS:-flys}
 SEDINITSQLS=${SEDINITSQLS:-}
 
 
@@ -296,18 +296,6 @@
        -e "s@<help-url>http://example.com</help-url>@<help-url>${WIKI_URL}</help-url>@g" \
     $WORK_DIR/server/conf/conf.xml
 
-cat > $WORK_DIR/server/conf/seddb-db.xml << EOF
-<?xml version="1.0" encoding="UTF-8" ?>
-<seddb-database>
-    <!-- This is the default SedDB db configuration. -->
-    <user>$SEDDBUSER</user>
-    <password>$SEDDBPASS</password>
-    <dialect>org.hibernate.dialect.Oracle9iDialect</dialect>
-    <driver>oracle.jdbc.driver.OracleDriver</driver>
-    <url>jdbc:oracle:thin:@//$SEDDBURL:$SEDDBPORT/$SEDDBBACK</url>
-    <connection-init-sqls>$SEDINITSQLS</connection-init-sqls>
-</seddb-database>
-EOF
 
 if [ "$BUILD_ORACLE" = "TRUE" ]; then
     # Oracle backend configuration
@@ -322,6 +310,19 @@
     <connection-init-sqls>$INITSQLS</connection-init-sqls>
 </backend-database>
 EOF
+
+cat > $WORK_DIR/server/conf/seddb-db.xml << EOF
+<?xml version="1.0" encoding="UTF-8" ?>
+<seddb-database>
+    <user>$SEDDBUSER</user>
+    <password>$SEDDBPASS</password>
+    <dialect>org.hibernate.dialect.Oracle9iDialect</dialect>
+    <driver>oracle.jdbc.driver.OracleDriver</driver>
+    <url>jdbc:oracle:thin:@//$SEDDBURL:$SEDDBPORT/$SEDDBBACK</url>
+    <connection-init-sqls>$SEDINITSQLS</connection-init-sqls>
+</seddb-database>
+EOF
+
 else
     #Postgresql backend configuration
     cat > $WORK_DIR/server/conf/backend-db.xml << EOF
@@ -335,6 +336,18 @@
     <connection-init-sqls>$INITSQLS</connection-init-sqls>
 </backend-database>
 EOF
+
+cat > $WORK_DIR/server/conf/seddb-db.xml << EOF
+<?xml version="1.0" encoding="UTF-8" ?>
+<seddb-database>
+    <user>$SEDDBUSER</user>
+    <password>$SEDDBPASS</password>
+    <dialect>org.hibernate.dialect.PostgreSQLDialect</dialect>
+    <driver>org.postgresql.Driver</driver>
+    <url>jdbc:postgresql://$SEDDBURL:$SEDDBPORT/$SEDDBBACK</url>
+</seddb-database>
+EOF
+
 fi
 
 mkdir $WORK_DIR/artifactsdb

http://dive4elements.wald.intevation.org