Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
6224:8f129977e76e | 6225:0aa9c5d8dccb |
---|---|
70 # Prefix to FreeSans.ttf | 70 # Prefix to FreeSans.ttf |
71 FONT_PATH=${FONT_PATH:-/opt/flys} | 71 FONT_PATH=${FONT_PATH:-/opt/flys} |
72 | 72 |
73 # Seddb Configuration | 73 # Seddb Configuration |
74 SEDDBURL=${SEDDBURL:-czech-republic.atlas.intevation.de} | 74 SEDDBURL=${SEDDBURL:-czech-republic.atlas.intevation.de} |
75 SEDDBPORT=${SEDDBPORT:-1521} | 75 SEDDBPORT=${SEDDBPORT:-5432} |
76 SEDDBBACK=${SEDDBBACK:-XE} | 76 SEDDBBACK=${SEDDBBACK:-seddb} |
77 SEDDBUSER=${SEDDBUSER:-seddb} | 77 SEDDBUSER=${SEDDBUSER:-flys} |
78 SEDDBPASS=${SEDDBPASS:-seddbpass} | 78 SEDDBPASS=${SEDDBPASS:-flys} |
79 SEDINITSQLS=${SEDINITSQLS:-} | 79 SEDINITSQLS=${SEDINITSQLS:-} |
80 | 80 |
81 | 81 |
82 # Backend configuration | 82 # Backend configuration |
83 BACKENDURL=${BACKENDURL:-czech-republic.atlas.intevation.de} | 83 BACKENDURL=${BACKENDURL:-czech-republic.atlas.intevation.de} |
294 | 294 |
295 sed -i -e "s@<dgm-path>/path/to/rivers/</dgm-path>@<dgm-path>${DGM_PATH}</dgm-path>@g" \ | 295 sed -i -e "s@<dgm-path>/path/to/rivers/</dgm-path>@<dgm-path>${DGM_PATH}</dgm-path>@g" \ |
296 -e "s@<help-url>http://example.com</help-url>@<help-url>${WIKI_URL}</help-url>@g" \ | 296 -e "s@<help-url>http://example.com</help-url>@<help-url>${WIKI_URL}</help-url>@g" \ |
297 $WORK_DIR/server/conf/conf.xml | 297 $WORK_DIR/server/conf/conf.xml |
298 | 298 |
299 cat > $WORK_DIR/server/conf/seddb-db.xml << EOF | |
300 <?xml version="1.0" encoding="UTF-8" ?> | |
301 <seddb-database> | |
302 <!-- This is the default SedDB db configuration. --> | |
303 <user>$SEDDBUSER</user> | |
304 <password>$SEDDBPASS</password> | |
305 <dialect>org.hibernate.dialect.Oracle9iDialect</dialect> | |
306 <driver>oracle.jdbc.driver.OracleDriver</driver> | |
307 <url>jdbc:oracle:thin:@//$SEDDBURL:$SEDDBPORT/$SEDDBBACK</url> | |
308 <connection-init-sqls>$SEDINITSQLS</connection-init-sqls> | |
309 </seddb-database> | |
310 EOF | |
311 | 299 |
312 if [ "$BUILD_ORACLE" = "TRUE" ]; then | 300 if [ "$BUILD_ORACLE" = "TRUE" ]; then |
313 # Oracle backend configuration | 301 # Oracle backend configuration |
314 cat > $WORK_DIR/server/conf/backend-db.xml << EOF | 302 cat > $WORK_DIR/server/conf/backend-db.xml << EOF |
315 <?xml version="1.0" encoding="UTF-8" ?> | 303 <?xml version="1.0" encoding="UTF-8" ?> |
320 <driver>oracle.jdbc.driver.OracleDriver</driver> | 308 <driver>oracle.jdbc.driver.OracleDriver</driver> |
321 <url>jdbc:oracle:thin:@//$BACKENDURL:$BACKENDPORT/$BACKENDBACK</url> | 309 <url>jdbc:oracle:thin:@//$BACKENDURL:$BACKENDPORT/$BACKENDBACK</url> |
322 <connection-init-sqls>$INITSQLS</connection-init-sqls> | 310 <connection-init-sqls>$INITSQLS</connection-init-sqls> |
323 </backend-database> | 311 </backend-database> |
324 EOF | 312 EOF |
313 | |
314 cat > $WORK_DIR/server/conf/seddb-db.xml << EOF | |
315 <?xml version="1.0" encoding="UTF-8" ?> | |
316 <seddb-database> | |
317 <user>$SEDDBUSER</user> | |
318 <password>$SEDDBPASS</password> | |
319 <dialect>org.hibernate.dialect.Oracle9iDialect</dialect> | |
320 <driver>oracle.jdbc.driver.OracleDriver</driver> | |
321 <url>jdbc:oracle:thin:@//$SEDDBURL:$SEDDBPORT/$SEDDBBACK</url> | |
322 <connection-init-sqls>$SEDINITSQLS</connection-init-sqls> | |
323 </seddb-database> | |
324 EOF | |
325 | |
325 else | 326 else |
326 #Postgresql backend configuration | 327 #Postgresql backend configuration |
327 cat > $WORK_DIR/server/conf/backend-db.xml << EOF | 328 cat > $WORK_DIR/server/conf/backend-db.xml << EOF |
328 <?xml version="1.0" encoding="UTF-8" ?> | 329 <?xml version="1.0" encoding="UTF-8" ?> |
329 <backend-database> | 330 <backend-database> |
333 <driver>org.postgresql.Driver</driver> | 334 <driver>org.postgresql.Driver</driver> |
334 <url>jdbc:postgresql://$BACKENDURL:$BACKENDPORT/$BACKENDBACK</url> | 335 <url>jdbc:postgresql://$BACKENDURL:$BACKENDPORT/$BACKENDBACK</url> |
335 <connection-init-sqls>$INITSQLS</connection-init-sqls> | 336 <connection-init-sqls>$INITSQLS</connection-init-sqls> |
336 </backend-database> | 337 </backend-database> |
337 EOF | 338 EOF |
339 | |
340 cat > $WORK_DIR/server/conf/seddb-db.xml << EOF | |
341 <?xml version="1.0" encoding="UTF-8" ?> | |
342 <seddb-database> | |
343 <user>$SEDDBUSER</user> | |
344 <password>$SEDDBPASS</password> | |
345 <dialect>org.hibernate.dialect.PostgreSQLDialect</dialect> | |
346 <driver>org.postgresql.Driver</driver> | |
347 <url>jdbc:postgresql://$SEDDBURL:$SEDDBPORT/$SEDDBBACK</url> | |
348 </seddb-database> | |
349 EOF | |
350 | |
338 fi | 351 fi |
339 | 352 |
340 mkdir $WORK_DIR/artifactsdb | 353 mkdir $WORK_DIR/artifactsdb |
341 mkdir $WORK_DIR/datacagedb | 354 mkdir $WORK_DIR/datacagedb |
342 | 355 |