#!/bin/bash cat <<EOF > container.tpl <Resource auth="Container" name="jdbc/configb" type="javax.sql.DataSource" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://%s/%s" username="%s" password="%s" initialSize="0" maxActive="30" maxIdle="4" minIdle="0" maxWait="10000" poolPreparedStatements="true" testOnBorrow="true" timeBetweenEvictionRunsMillis="60000" numTestsPerEvictionRun="30" minEvictableIdleTimeMillis="180000" removeAbandoned="true" removeAbandonedTimeout = "60" logAbandoned="true" /> EOF #\$0 pour ne pas interpreter... cat <<EOF > container.awk /name="jdbc\/3900"/ { gsub("jdbc/3900", "jdbc/data", \$0); } match(\$0, /<Parameter name="mysql.host" value="(.+)" override="true"\/>/, m) { host=m[1]; next } match(\$0, /<Parameter name="mysql.database" value="(.+)" override="true"\/>/, m) { database=m[1]; next } match(\$0, /<Parameter name="mysql.username" value="(.+)" override="true"\/>/, m) { username=m[1]; next } match(\$0, /<Parameter name="mysql.
Continuer la lecture