Commit fc5f7fa 1 parent e38cc6e commit fc5f7fa Copy full SHA for fc5f7fa
File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 45
45
canUseRollingLogs=true
46
46
useFallbackJvmFlag=false
47
47
48
+ if [[ ${FTB_DIR:- } ]]; then
49
+ SERVER_DIR=" $FTB_DIR "
50
+ else
51
+ SERVER_DIR=/data
52
+ fi
53
+
54
+
48
55
patchLog4jConfig () {
49
56
file=${1?}
50
57
url=${2?}
51
- if ! get -o " $file " " $url " ; then
58
+ if ! get -o " ${SERVER_DIR} / ${ file} " " $url " ; then
52
59
log " ERROR: failed to download corrected log4j config, fallback to JVM flag"
53
60
useFallbackJvmFlag=true
54
61
return 1
@@ -94,14 +101,14 @@ if isTrue "${ENABLE_ROLLING_LOGS:-false}"; then
94
101
exit 1
95
102
fi
96
103
# Set up log configuration
97
- LOGFILE=" /data /log4j2.xml"
104
+ LOGFILE=" ${SERVER_DIR} /log4j2.xml"
98
105
if [ ! -e " $LOGFILE " ]; then
99
106
log " Creating log4j2.xml in ${LOGFILE} "
100
107
cp /image/log4j2.xml " $LOGFILE "
101
108
else
102
109
log " log4j2.xml already created, skipping"
103
110
fi
104
- JVM_OPTS=" -Dlog4j.configurationFile=/data/ log4j2.xml ${JVM_OPTS} "
111
+ JVM_OPTS=" -Dlog4j.configurationFile=log4j2.xml ${JVM_OPTS} "
105
112
fi
106
113
107
114
# Optional disable console
You can’t perform that action at this time.
0 commit comments