Skip to content

Commit

Permalink
added check to prevent config override if not present (#2819)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaygarg-oracle authored Jun 24, 2024
1 parent a8f47ae commit 53f2052
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions OracleIdentityGovernance/samples/scripts/agentAutoUpdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,33 @@ if [ -f "$1"/cacerts ]
-co "$1"/data/conf/config.properties \
-cv "$agentVersion"
else
java \
-DidoConfig.logDir="$1"/data/logs \
-DidoConfig.metricsDir="$1"/newpackage \
-DidoConfig.walletDir="$1"/newpackage \
-DidoConfig.workDir="$1"/newpackage \
-cp idm-agcs-agent-cli-upgrade.jar \
com.oracle.idm.agcs.agent.cli.AgentUpdateMain \
--config "$1"/data/conf/config.json \
ido autoRunUpdate \
-ip "$1" \
-co "$1"/data/conf/config.properties \
-cv "$agentVersion"
if [ -f "$1"/data/conf/config.properties ]
then
java \
-DidoConfig.logDir="$1"/data/logs \
-DidoConfig.metricsDir="$1"/newpackage \
-DidoConfig.walletDir="$1"/newpackage \
-DidoConfig.workDir="$1"/newpackage \
-cp idm-agcs-agent-cli-upgrade.jar \
com.oracle.idm.agcs.agent.cli.AgentUpdateMain \
--config "$1"/data/conf/config.json \
ido autoRunUpdate \
-ip "$1" \
-co "$1"/data/conf/config.properties \
-cv "$agentVersion"
else
java \
-DidoConfig.logDir="$1"/data/logs \
-DidoConfig.metricsDir="$1"/newpackage \
-DidoConfig.walletDir="$1"/newpackage \
-DidoConfig.workDir="$1"/newpackage \
-cp idm-agcs-agent-cli-upgrade.jar \
com.oracle.idm.agcs.agent.cli.AgentUpdateMain \
--config "$1"/data/conf/config.json \
ido autoRunUpdate \
-ip "$1" \
-cv "$agentVersion"
fi
fi

# shellcheck disable=SC2181
Expand Down

0 comments on commit 53f2052

Please sign in to comment.