mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Make start/stop run-levels configurable in INIT-INFO of launch.script
See gh-7008 Closes gh-7902
This commit is contained in:
parent
353829c4e5
commit
ec537b307e
@ -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.
|
||||
|
@ -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}}
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user