forked from mmcc/runscope-agent-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
38 lines (32 loc) · 883 Bytes
/
Copy pathrun.sh
File metadata and controls
38 lines (32 loc) · 883 Bytes
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
#!/bin/bash
if [[ $TOKEN ]]; then
sed -i -e "s/token=.*/token=${TOKEN}/" /etc/runscope-radar/radar.conf
else
echo "TOKEN environment variable required"
exit 1
fi
if [[ $AGENT_ID ]]; then
sed -i -e "s/agent-id=.*/agent-id=${AGENT_ID}/" /etc/runscope-radar/radar.conf
else
echo "AGENT_ID environment variable required"
exit 1
fi
if [[ $TEAM_ID ]]; then
sed -i -e "s/team-id=.*/team-id=${TEAM_ID}/" /etc/runscope-radar/radar.conf
else
echo "TEAM_ID environment variable required"
exit 1
fi
if [[ $NAME ]]; then
sed -i -e "s/name=.*/name=${NAME}/" /etc/runscope-radar/radar.conf
else
echo "NAME environment variable required"
exit 1
fi
if [[ $TOKEN ]]; then
sed -i -e "s/token=.*/token=${TOKEN}/" /etc/runscope-radar/radar.conf
else
echo "NAME environment variable required"
exit 1
fi
exec /usr/local/bin/runscope-radar -f /etc/runscope-radar/radar.conf