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
f48545bd
Commit
f48545bd
authored
Oct 14, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.5.x'
parents
84c9c7bd
899b8a04
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
2 deletions
+17
-2
SysVinitLaunchScriptIT.java
...ngframework/boot/launchscript/SysVinitLaunchScriptIT.java
+5
-0
launch-with-relative-log-folder.sh
...test/resources/scripts/launch-with-relative-log-folder.sh
+8
-0
launch-with-relative-pid-folder.sh
...test/resources/scripts/launch-with-relative-pid-folder.sh
+2
-2
launch.script
...urces/org/springframework/boot/loader/tools/launch.script
+2
-0
No files found.
spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java
View file @
f48545bd
...
...
@@ -207,7 +207,12 @@ public class SysVinitLaunchScriptIT {
coloredString
(
AnsiColor
.
GREEN
,
"Running ["
+
extractPid
(
output
)
+
"]"
));
assertThat
(
output
).
has
(
coloredString
(
AnsiColor
.
GREEN
,
"Stopped ["
+
extractPid
(
output
)
+
"]"
));
}
@Test
public
void
launchWithRelativeLogFolder
()
throws
Exception
{
String
output
=
doTest
(
"launch-with-relative-log-folder.sh"
);
assertThat
(
output
).
contains
(
"Log written"
);
}
private
void
doLaunch
(
String
script
)
throws
Exception
{
...
...
spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/resources/scripts/launch-with-relative-log-folder.sh
0 → 100755
View file @
f48545bd
source
./test-functions.sh
mkdir
./pid
install_service
echo
'LOG_FOLDER=log'
>
/test-service/spring-boot-app.conf
mkdir
-p
/test-service/log
start_service
await_app
[[
-s
/test-service/log/spring-boot-app.log
]]
&&
echo
"Log written"
\ No newline at end of file
spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/resources/scripts/launch-with-relative-pid-folder.sh
View file @
f48545bd
source
./test-functions.sh
mkdir
./pid
install_service
echo
'PID_FOLDER=./pid'
>
/test-service/spring-boot-app.conf
mkdir
/test-service/pid
echo
'PID_FOLDER=pid'
>
/test-service/spring-boot-app.conf
start_service
echo
"PID:
$(
cat
/test-service/pid/spring-boot-app/spring-boot-app.pid
)
"
await_app
...
...
spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script
View file @
f48545bd
...
...
@@ -52,6 +52,8 @@ configfile="$(basename "${jarfile%.*}.conf")"
# Initialize PID/LOG locations if they weren't provided by the config file
[[
-z
"
$PID_FOLDER
"
]]
&&
PID_FOLDER
=
"{{pidFolder:/var/run}}"
[[
-z
"
$LOG_FOLDER
"
]]
&&
LOG_FOLDER
=
"{{logFolder:/var/log}}"
!
[[
"
$PID_FOLDER
"
==
/
*
]]
&&
PID_FOLDER
=
"
$(
dirname
"
$jarfile
"
)
"
/
"
$PID_FOLDER
"
!
[[
"
$LOG_FOLDER
"
==
/
*
]]
&&
LOG_FOLDER
=
"
$(
dirname
"
$jarfile
"
)
"
/
"
$LOG_FOLDER
"
!
[[
-x
"
$PID_FOLDER
"
]]
&&
PID_FOLDER
=
"/tmp"
!
[[
-x
"
$LOG_FOLDER
"
]]
&&
LOG_FOLDER
=
"/tmp"
...
...
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