-
Notifications
You must be signed in to change notification settings - Fork 2
/
entrypoint.sh
46 lines (35 loc) · 1.24 KB
/
entrypoint.sh
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
41
42
43
44
45
46
#!/bin/bash
echo "Starting Repair-Docker - Building the command"
# As the command gets maybe complex,
# it is stitched together with any flag set in docker.
# Repairtarget must be set, otherwise it makes little sense
commandCollector="/app/propr $REPAIR_TARGET"
if [ -z ${LOG_LEVEL+x} ];
then echo "Log-Level is not set";
else commandCollector="$commandCollector --log-level=$LOG_LEVEL ";
fi
if [ -z ${LOG_FILE+x} ];
then echo "Log-File is not set";
else commandCollector="$commandCollector --log-file=$LOG_FILE ";
fi
if [ -z ${CONFIG_FILE+x} ];
then echo "Configuration-File is not set";
else commandCollector="$commandCollector --config=$CONFIG_FILE ";
fi
if [ -z ${CONFIG_OVERRIDE+x} ];
then echo "No Configuration Override given";
else commandCollector="$commandCollector --override=$CONFIG_OVERRIDE ";
fi
if [ -z ${NO_TIMESTAMP+x} ];
then echo "TimeStamps will be printed";
else commandCollector="$commandCollector --no-log-timestamp ";
fi
if [ -z ${SEED+x} ];
then echo "";
else commandCollector="$commandCollector --seed=$SEED ";
fi
echo "final cmd is ${commandCollector}"
/bin/bash -c "$commandCollector"
# To keep the container open for inspection
# echo "Program finished - Keeping Container open for inspection"
# tail -f /dev/null