diff --git a/spring-boot-docs/src/main/asciidoc/deployment.adoc b/spring-boot-docs/src/main/asciidoc/deployment.adoc index c8aa0fc681..6a4820eafe 100644 --- a/spring-boot-docs/src/main/asciidoc/deployment.adoc +++ b/spring-boot-docs/src/main/asciidoc/deployment.adoc @@ -604,6 +604,13 @@ The following property substitutions are supported with the default script: |`initInfoRequiredStop` |The `Required-Stop` section of "`INIT INFO`". Defaults to `$remote_fs $syslog $network`. + +|`initInfoDefaultStart` +|The `Default-Start` section of "`INIT INFO`". Defaults to `2 3 4 5`. + +|`initInfoDefaultStop` +|The `Default-Stop` section of "`INIT INFO`". Defaults to `0 1 6`. + |`initInfoShortDescription` |The `Short-Description` section of "`INIT INFO`". Defaults to `Spring Boot Application` for Gradle and to `${project.name}` for Maven. diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script b/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script index 4a0e706de6..25facc1ede 100755 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script @@ -13,8 +13,8 @@ # Provides: {{initInfoProvides:spring-boot-application}} # Required-Start: {{initInfoRequiredStart:$remote_fs $syslog $network}} # Required-Stop: {{initInfoRequiredStop:$remote_fs $syslog $network}} -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 +# Default-Start: {{initInfoDefaultStart:2 3 4 5}} +# Default-Stop: {{initInfoDefaultStop:0 1 6}} # Short-Description: {{initInfoShortDescription:Spring Boot Application}} # Description: {{initInfoDescription:Spring Boot Application}} # chkconfig: {{initInfoChkconfig:2345 99 01}} diff --git a/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/DefaultLaunchScriptTests.java b/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/DefaultLaunchScriptTests.java index 209d9d1b58..fd4998ff27 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/DefaultLaunchScriptTests.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/DefaultLaunchScriptTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,6 +71,16 @@ public class DefaultLaunchScriptTests { assertThatPlaceholderCanBeReplaced("initInfoRequiredStop"); } + @Test + public void initInfoDefaultStartCanBeReplaced() throws Exception { + assertThatPlaceholderCanBeReplaced("initInfoDefaultStart"); + } + + @Test + public void initInfoDefaultStopCanBeReplaced() throws Exception { + assertThatPlaceholderCanBeReplaced("initInfoDefaultStop"); + } + @Test public void initInfoShortDescriptionCanBeReplaced() throws Exception { assertThatPlaceholderCanBeReplaced("initInfoShortDescription");