Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
3f894cbe
Commit
3f894cbe
authored
Sep 19, 2018
by
Andreas Gebhardt
Committed by
Andy Wilkinson
Oct 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log a warning when using fallback for pid and log locations
See gh-14519
parent
5d0e812a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
launch.script
...urces/org/springframework/boot/loader/tools/launch.script
+7
-7
No files found.
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script
View file @
3f894cbe
...
@@ -57,13 +57,18 @@ configfile="$(basename "${jarfile%.*}.conf")"
...
@@ -57,13 +57,18 @@ configfile="$(basename "${jarfile%.*}.conf")"
# shellcheck source=/dev/null
# shellcheck source=/dev/null
[[
-r
"
${
CONF_FOLDER
}
/
${
configfile
}
"
]]
&&
source
"
${
CONF_FOLDER
}
/
${
configfile
}
"
[[
-r
"
${
CONF_FOLDER
}
/
${
configfile
}
"
]]
&&
source
"
${
CONF_FOLDER
}
/
${
configfile
}
"
# ANSI Colors
echoRed
()
{
echo
$'
\e
[0;31m'
"
$1
"
$'
\e
[0m'
;
}
echoGreen
()
{
echo
$'
\e
[0;32m'
"
$1
"
$'
\e
[0m'
;
}
echoYellow
()
{
echo
$'
\e
[0;33m'
"
$1
"
$'
\e
[0m'
;
}
# Initialize PID/LOG locations if they weren't provided by the config file
# Initialize PID/LOG locations if they weren't provided by the config file
[[
-z
"
$PID_FOLDER
"
]]
&&
PID_FOLDER
=
"{{pidFolder:/var/run}}"
[[
-z
"
$PID_FOLDER
"
]]
&&
PID_FOLDER
=
"{{pidFolder:/var/run}}"
[[
-z
"
$LOG_FOLDER
"
]]
&&
LOG_FOLDER
=
"{{logFolder:/var/log}}"
[[
-z
"
$LOG_FOLDER
"
]]
&&
LOG_FOLDER
=
"{{logFolder:/var/log}}"
!
[[
"
$PID_FOLDER
"
==
/
*
]]
&&
PID_FOLDER
=
"
$(
dirname
"
$jarfile
"
)
"
/
"
$PID_FOLDER
"
!
[[
"
$PID_FOLDER
"
==
/
*
]]
&&
PID_FOLDER
=
"
$(
dirname
"
$jarfile
"
)
"
/
"
$PID_FOLDER
"
!
[[
"
$LOG_FOLDER
"
==
/
*
]]
&&
LOG_FOLDER
=
"
$(
dirname
"
$jarfile
"
)
"
/
"
$LOG_FOLDER
"
!
[[
"
$LOG_FOLDER
"
==
/
*
]]
&&
LOG_FOLDER
=
"
$(
dirname
"
$jarfile
"
)
"
/
"
$LOG_FOLDER
"
!
[[
-x
"
$PID_FOLDER
"
]]
&&
PID_FOLDER
=
"/tmp"
!
[[
-x
"
$PID_FOLDER
"
]]
&&
echoYellow
"Warning: PID_FOLDER=
$PID_FOLDER
does not exists fallback to /tmp"
&&
PID_FOLDER
=
"/tmp"
!
[[
-x
"
$LOG_FOLDER
"
]]
&&
LOG_FOLDER
=
"/tmp"
!
[[
-x
"
$LOG_FOLDER
"
]]
&&
echoYellow
"Warning: LOG_FOLDER=
$LOG_FOLDER
does not exists fallback to /tmp"
&&
LOG_FOLDER
=
"/tmp"
# Set up defaults
# Set up defaults
[[
-z
"
$MODE
"
]]
&&
MODE
=
"{{mode:auto}}"
# modes are "auto", "service" or "run"
[[
-z
"
$MODE
"
]]
&&
MODE
=
"{{mode:auto}}"
# modes are "auto", "service" or "run"
...
@@ -84,11 +89,6 @@ fi
...
@@ -84,11 +89,6 @@ fi
# Initialize stop wait time if not provided by the config file
# Initialize stop wait time if not provided by the config file
[[
-z
"
$STOP_WAIT_TIME
"
]]
&&
STOP_WAIT_TIME
=
"{{stopWaitTime:60}}"
[[
-z
"
$STOP_WAIT_TIME
"
]]
&&
STOP_WAIT_TIME
=
"{{stopWaitTime:60}}"
# ANSI Colors
echoRed
()
{
echo
$'
\e
[0;31m'
"
$1
"
$'
\e
[0m'
;
}
echoGreen
()
{
echo
$'
\e
[0;32m'
"
$1
"
$'
\e
[0m'
;
}
echoYellow
()
{
echo
$'
\e
[0;33m'
"
$1
"
$'
\e
[0m'
;
}
# Utility functions
# Utility functions
checkPermissions
()
{
checkPermissions
()
{
touch
"
$pid_file
"
&> /dev/null
||
{
echoRed
"Operation not permitted (cannot access pid file)"
;
return
4
;
}
touch
"
$pid_file
"
&> /dev/null
||
{
echoRed
"Operation not permitted (cannot access pid file)"
;
return
4
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment