#!/bin/bash # Set property in mirth.properties # # setmirthprop key value # Set startup Java virtual machine option # # If both key and value are provided, key=value will be set, overwriting any existing line with that key. # # NOTE: The JVM options already include -XX:MaxRAMPercentage=50, so the max Java heap size will be ~50% of the available system RAM. You can set a different percentage, or override it by setting -Xmx instead. # # setmirthvmopt value # setmirthvmopt key value # Get value from AWS Secrets Manager, and set in mirth.properties # # Example with plaintext secret (replace the region and secret-id): # setmirthprop database.password $(aws secretsmanager get-secret-value --region us-east-1 --secret-id dbPassword | jq -r .SecretString) # # Example with key/value secret (replace the region, secret-id, and key): # setmirthprop database.password $(aws secretsmanager get-secret-value --region us-east-1 --secret-id dbPassword | jq -r .SecretString | jq -r .DB_PASSWORD) # Get extension from S3 and install # # aws s3 cp s3://bucketname/extension.zip . # sudo unzip extension.zip -d /opt/mirthconnect/extensions/ # sudo chown -R mirth:mirth /opt/mirthconnect/extensions/name # Get keystore from S3 # # aws s3 cp s3://bucketname/keystore.jks . # sudo chown mirth:mirth keystore.jks # sudo mv keystore.jks /opt/mirthconnect/appdata/keystore.jks # setmirthprop keystore.storepass STOREPASS # setmirthprop keystore.keypass KEYPASS # If you made any config/extension changes, restart Mirth Connect # sudo systemctl restart mirthconnect