Created
March 18, 2020 21:04
-
-
Save onefoursix/91b96dc2e831628e18b1c9f5fae7d689 to your computer and use it in GitHub Desktop.
Script to set database connection info in *-app.properties files for StreamSets Control Hub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare -a dbs=("jobrunner" "messaging" "notification" "pipelinestore" "policy" "provisioning" "reporting" "scheduler" "sdp_classification" "security" "sla" "timeseries" "topology" "dynamic_preview") | |
for i in "${dbs[@]}" | |
do | |
sed -i "s/^db.openjpa.ConnectionURL=/db.openjpa.ConnectionURL=jdbc\:mysql\:\/\/localhost:3306\/${i}?useSSL=false/" ${i}-app.properties | |
sed -i "s/^db.openjpa.ConnectionUserName=/db.openjpa.ConnectionUserName=sch/" ${i}-app.properties | |
sed -i "s/^db.openjpa.ConnectionPassword=/db.openjpa.ConnectionPassword=Mysql12345!/" ${i}-app.properties | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment