Make start/stop run-levels configurable in INIT-INFO of launch.script

See gh-7008
Closes gh-7902
pull/8038/head
Alessandro Falappa 8 years ago committed by Andy Wilkinson
parent 353829c4e5
commit ec537b307e

@ -604,6 +604,13 @@ The following property substitutions are supported with the default script:
|`initInfoRequiredStop` |`initInfoRequiredStop`
|The `Required-Stop` section of "`INIT INFO`". Defaults to `$remote_fs $syslog $network`. |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` |`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.

@ -13,8 +13,8 @@
# Provides: {{initInfoProvides:spring-boot-application}} # Provides: {{initInfoProvides:spring-boot-application}}
# Required-Start: {{initInfoRequiredStart:$remote_fs $syslog $network}} # Required-Start: {{initInfoRequiredStart:$remote_fs $syslog $network}}
# Required-Stop: {{initInfoRequiredStop:$remote_fs $syslog $network}} # Required-Stop: {{initInfoRequiredStop:$remote_fs $syslog $network}}
# Default-Start: 2 3 4 5 # Default-Start: {{initInfoDefaultStart:2 3 4 5}}
# Default-Stop: 0 1 6 # Default-Stop: {{initInfoDefaultStop:0 1 6}}
# Short-Description: {{initInfoShortDescription:Spring Boot Application}} # Short-Description: {{initInfoShortDescription:Spring Boot Application}}
# Description: {{initInfoDescription:Spring Boot Application}} # Description: {{initInfoDescription:Spring Boot Application}}
# chkconfig: {{initInfoChkconfig:2345 99 01}} # chkconfig: {{initInfoChkconfig:2345 99 01}}

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -71,6 +71,16 @@ public class DefaultLaunchScriptTests {
assertThatPlaceholderCanBeReplaced("initInfoRequiredStop"); assertThatPlaceholderCanBeReplaced("initInfoRequiredStop");
} }
@Test
public void initInfoDefaultStartCanBeReplaced() throws Exception {
assertThatPlaceholderCanBeReplaced("initInfoDefaultStart");
}
@Test
public void initInfoDefaultStopCanBeReplaced() throws Exception {
assertThatPlaceholderCanBeReplaced("initInfoDefaultStop");
}
@Test @Test
public void initInfoShortDescriptionCanBeReplaced() throws Exception { public void initInfoShortDescriptionCanBeReplaced() throws Exception {
assertThatPlaceholderCanBeReplaced("initInfoShortDescription"); assertThatPlaceholderCanBeReplaced("initInfoShortDescription");

Loading…
Cancel
Save