File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,18 @@ configfile="$(basename "${jarfile%.*}.conf")"
57
57
# shellcheck source=/dev/null
58
58
[[ -r " ${CONF_FOLDER} /${configfile} " ]] && source " ${CONF_FOLDER} /${configfile} "
59
59
60
+ # ANSI Colors
61
+ echoRed () { echo $' \e [0;31m' " $1 " $' \e [0m' ; }
62
+ echoGreen () { echo $' \e [0;32m' " $1 " $' \e [0m' ; }
63
+ echoYellow () { echo $' \e [0;33m' " $1 " $' \e [0m' ; }
64
+
60
65
# Initialize PID/LOG locations if they weren't provided by the config file
61
66
[[ -z " $PID_FOLDER " ]] && PID_FOLDER=" {{pidFolder:/var/run}}"
62
67
[[ -z " $LOG_FOLDER " ]] && LOG_FOLDER=" {{logFolder:/var/log}}"
63
68
! [[ " $PID_FOLDER " == /* ]] && PID_FOLDER=" $( dirname " $jarfile " ) " /" $PID_FOLDER "
64
69
! [[ " $LOG_FOLDER " == /* ]] && LOG_FOLDER=" $( dirname " $jarfile " ) " /" $LOG_FOLDER "
65
- ! [[ -x " $PID_FOLDER " ]] && PID_FOLDER=" /tmp"
66
- ! [[ -x " $LOG_FOLDER " ]] && LOG_FOLDER=" /tmp"
70
+ ! [[ -x " $PID_FOLDER " ]] && echoYellow " Warning: PID_FOLDER= $PID_FOLDER does not exists fallback to /tmp " && PID_FOLDER=" /tmp"
71
+ ! [[ -x " $LOG_FOLDER " ]] && echoYellow " Warning: LOG_FOLDER= $LOG_FOLDER does not exists fallback to /tmp " && LOG_FOLDER=" /tmp"
67
72
68
73
# Set up defaults
69
74
[[ -z " $MODE " ]] && MODE=" {{mode:auto}}" # modes are "auto", "service" or "run"
84
89
# Initialize stop wait time if not provided by the config file
85
90
[[ -z " $STOP_WAIT_TIME " ]] && STOP_WAIT_TIME=" {{stopWaitTime:60}}"
86
91
87
- # ANSI Colors
88
- echoRed () { echo $' \e [0;31m' " $1 " $' \e [0m' ; }
89
- echoGreen () { echo $' \e [0;32m' " $1 " $' \e [0m' ; }
90
- echoYellow () { echo $' \e [0;33m' " $1 " $' \e [0m' ; }
91
-
92
92
# Utility functions
93
93
checkPermissions () {
94
94
touch " $pid_file " & > /dev/null || { echoRed " Operation not permitted (cannot access pid file)" ; return 4; }
You can’t perform that action at this time.
0 commit comments