Skip to content

Commit baeb9c3

Browse files
committed
Merge pull request #7902 from Alessandro Falappa
* gh-7902: Make start/stop run-levels configurable in INIT-INFO of launch.script
2 parents 353829c + ec537b3 commit baeb9c3

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

spring-boot-docs/src/main/asciidoc/deployment.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,13 @@ The following property substitutions are supported with the default script:
604604
|`initInfoRequiredStop`
605605
|The `Required-Stop` section of "`INIT INFO`". Defaults to `$remote_fs $syslog $network`.
606606

607+
608+
|`initInfoDefaultStart`
609+
|The `Default-Start` section of "`INIT INFO`". Defaults to `2 3 4 5`.
610+
611+
|`initInfoDefaultStop`
612+
|The `Default-Stop` section of "`INIT INFO`". Defaults to `0 1 6`.
613+
607614
|`initInfoShortDescription`
608615
|The `Short-Description` section of "`INIT INFO`". Defaults to `Spring Boot Application`
609616
for Gradle and to `${project.name}` for Maven.

spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# Provides: {{initInfoProvides:spring-boot-application}}
1414
# Required-Start: {{initInfoRequiredStart:$remote_fs $syslog $network}}
1515
# Required-Stop: {{initInfoRequiredStop:$remote_fs $syslog $network}}
16-
# Default-Start: 2 3 4 5
17-
# Default-Stop: 0 1 6
16+
# Default-Start: {{initInfoDefaultStart:2 3 4 5}}
17+
# Default-Stop: {{initInfoDefaultStop:0 1 6}}
1818
# Short-Description: {{initInfoShortDescription:Spring Boot Application}}
1919
# Description: {{initInfoDescription:Spring Boot Application}}
2020
# chkconfig: {{initInfoChkconfig:2345 99 01}}

spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/DefaultLaunchScriptTests.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -71,6 +71,16 @@ public void initInfoRequiredStopCanBeReplaced() throws Exception {
7171
assertThatPlaceholderCanBeReplaced("initInfoRequiredStop");
7272
}
7373

74+
@Test
75+
public void initInfoDefaultStartCanBeReplaced() throws Exception {
76+
assertThatPlaceholderCanBeReplaced("initInfoDefaultStart");
77+
}
78+
79+
@Test
80+
public void initInfoDefaultStopCanBeReplaced() throws Exception {
81+
assertThatPlaceholderCanBeReplaced("initInfoDefaultStop");
82+
}
83+
7484
@Test
7585
public void initInfoShortDescriptionCanBeReplaced() throws Exception {
7686
assertThatPlaceholderCanBeReplaced("initInfoShortDescription");

0 commit comments

Comments
 (0)