When we have truststore and password information to start B4G, for security reason it is not desired to have it exposed.
So does B4G accept to pass properties file as a command parameter?
Since it is a Linux server, follow first suggestion and run Bridge as a service. Subsequently, if you want to hide secrets from the service file as well, create an extra file for them:
/etc/bridge/secrets.conf.
The file's content consists of variables and values for all the secrets:
example:
TSPASS=mypass
Ensure permissions are restricted to the right user and group; using the above suggestion, this is the bridge user.
chown bridge:bridge /etc/bridge/secrets.conf
chmod 600 /etc/bridge/secrets.conf
Finally, use the secrets file in the service configuration:
[Service]
EnvironmentFile=/etc/bridge/secrets.conf
ExecStart=/bin/java -Djavax.net.ssl.trustStore=/home/bfg/bridge.jks -Djavax.net.ssl.trustStorePassword=${TSPASS} -jar BridgeForGit-1.2.3.jar