forked from ot4i/ace-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathace_config_agent.sh
More file actions
executable file
·40 lines (31 loc) · 1.64 KB
/
ace_config_agent.sh
File metadata and controls
executable file
·40 lines (31 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# © Copyright IBM Corporation 2018.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v20.html
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source ${SCRIPT_DIR}/ace_config_logging.sh
log "Handling agent configuration"
if [ -s "/home/aceuser/initial-config/agent/switch.json" ]; then
mkdir -p /home/aceuser/ace-server/config/iibswitch/switch
cp /home/aceuser/initial-config/agent/switch.json /home/aceuser/ace-server/config/iibswitch/switch/switch.json
fi
if [ -s "/home/aceuser/initial-config/agent/agentx.json" ]; then
mkdir -p /home/aceuser/ace-server/config/iibswitch/agentx
cp /home/aceuser/initial-config/agent/agentx.json /home/aceuser/ace-server/config/iibswitch/agentx/agentx.json
fi
if [ -s "/home/aceuser/initial-config/agent/agenta.json" ]; then
mkdir -p /home/aceuser/ace-server/config/iibswitch/agenta
cp /home/aceuser/initial-config/agent/agenta.json /home/aceuser/ace-server/config/iibswitch/agenta/agenta.json
fi
if [ -s "/home/aceuser/initial-config/agent/agentp.json" ]; then
mkdir -p /home/aceuser/ace-server/config/iibswitch/agentp
cp /home/aceuser/initial-config/agent/agentp.json /home/aceuser/ace-server/config/iibswitch/agentp/agentp.json
fi
if [ -s "/home/aceuser/initial-config/agent/agentc.json" ]; then
mkdir -p /home/aceuser/ace-server/config/iibswitch/agentc
cp /home/aceuser/initial-config/agent/agentc.json /home/aceuser/ace-server/config/iibswitch/agentc/agentc.json
fi
log "agent configuration complete"