Commit d18ee71c authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #7555 from AlexFalappa:master

* pr/7555:
  INIT INFO Required Start/Stop as embedded launch script properties
parents 6fd94763 dd7d81a5
...@@ -598,6 +598,12 @@ The following property substitutions are supported with the default script: ...@@ -598,6 +598,12 @@ The following property substitutions are supported with the default script:
|The `Provides` section of "`INIT INFO`". Defaults to `spring-boot-application` for Gradle |The `Provides` section of "`INIT INFO`". Defaults to `spring-boot-application` for Gradle
and to `${project.artifactId}` for Maven. and to `${project.artifactId}` for Maven.
|`initInfoRequiredStart`
|The `Required-Start` section of "`INIT INFO`". Defaults to `$remote_fs $syslog $network`.
|`initInfoRequiredStop`
|The `Required-Stop` section of "`INIT INFO`". Defaults to `$remote_fs $syslog $network`.
|`initInfoShortDescription` |`initInfoShortDescription`
|The `Short-Description` section of "`INIT INFO`". Defaults to `Spring Boot Application` |The `Short-Description` section of "`INIT INFO`". Defaults to `Spring Boot Application`
for Gradle and to `${project.name}` for Maven. for Gradle and to `${project.name}` for Maven.
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: {{initInfoProvides:spring-boot-application}} # Provides: {{initInfoProvides:spring-boot-application}}
# Required-Start: $remote_fs $syslog $network # Required-Start: {{initInfoRequiredStart:$remote_fs $syslog $network}}
# Required-Stop: $remote_fs $syslog $network # Required-Stop: {{initInfoRequiredStop:$remote_fs $syslog $network}}
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: 0 1 6 # Default-Stop: 0 1 6
# Short-Description: {{initInfoShortDescription:Spring Boot Application}} # Short-Description: {{initInfoShortDescription:Spring Boot Application}}
......
...@@ -61,6 +61,16 @@ public class DefaultLaunchScriptTests { ...@@ -61,6 +61,16 @@ public class DefaultLaunchScriptTests {
assertThatPlaceholderCanBeReplaced("initInfoProvides"); assertThatPlaceholderCanBeReplaced("initInfoProvides");
} }
@Test
public void initInfoRequiredStartCanBeReplaced() throws Exception {
assertThatPlaceholderCanBeReplaced("initInfoRequiredStart");
}
@Test
public void initInfoRequiredStopCanBeReplaced() throws Exception {
assertThatPlaceholderCanBeReplaced("initInfoRequiredStop");
}
@Test @Test
public void initInfoShortDescriptionCanBeReplaced() throws Exception { public void initInfoShortDescriptionCanBeReplaced() throws Exception {
assertThatPlaceholderCanBeReplaced("initInfoShortDescription"); assertThatPlaceholderCanBeReplaced("initInfoShortDescription");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment