Merge branch '1.5.x'

pull/6782/merge
Andy Wilkinson 8 years ago
commit bc6b2a9c75

@ -617,9 +617,16 @@ for Gradle and to `${project.name}` for Maven.
|`logFolder` |`logFolder`
|The default value for `LOG_FOLDER`. Only valid for an `init.d` service. |The default value for `LOG_FOLDER`. Only valid for an `init.d` service.
|`logFilename`
|The default value for `LOG_FILENAME`. Only valid for an `init.d` service.
|`pidFolder` |`pidFolder`
|The default value for `PID_FOLDER`. Only valid for an `init.d` service. |The default value for `PID_FOLDER`. Only valid for an `init.d` service.
|`pidFilename`
|The default value for the name of the pid file in `PID_FOLDER`. Only valid for an
`init.d` service.
|`useStartStopDaemon` |`useStartStopDaemon`
|If the `start-stop-daemon` command, when it's available, should be used to control the |If the `start-stop-daemon` command, when it's available, should be used to control the
process. Defaults to `true`. process. Defaults to `true`.

@ -71,8 +71,7 @@ if [[ -z "$identity" ]]; then
fi fi
# Initialize log file name if not provided by the config file # Initialize log file name if not provided by the config file
[[ -z "$LOG_FILENAME" ]] && LOG_FILENAME="${identity}.log" [[ -z "$LOG_FILENAME" ]] && LOG_FILENAME="{{logFilename:${identity}.log}}"
# ANSI Colors # ANSI Colors
echoRed() { echo $'\e[0;31m'"$1"$'\e[0m'; } echoRed() { echo $'\e[0;31m'"$1"$'\e[0m'; }
@ -114,7 +113,7 @@ if [[ "$identity" == "$init_script" ]] || [[ "$identity" == "$APP_NAME" ]]; then
PID_FOLDER="$PID_FOLDER/${identity}" PID_FOLDER="$PID_FOLDER/${identity}"
pid_subfolder=$PID_FOLDER pid_subfolder=$PID_FOLDER
fi fi
pid_file="$PID_FOLDER/${identity}.pid" pid_file="$PID_FOLDER/{{pidFilename:${identity}.pid}}"
log_file="$LOG_FOLDER/$LOG_FILENAME" log_file="$LOG_FOLDER/$LOG_FILENAME"
# Determine the user to run as if we are root # Determine the user to run as if we are root

@ -46,6 +46,16 @@ public class DefaultLaunchScriptTests {
assertThat(content).contains("Spring Boot Startup Script"); assertThat(content).contains("Spring Boot Startup Script");
} }
@Test
public void logFilenameCanBeReplaced() throws Exception {
assertThatPlaceholderCanBeReplaced("logFilename");
}
@Test
public void pidFilenameCanBeReplaced() throws Exception {
assertThatPlaceholderCanBeReplaced("pidFilename");
}
@Test @Test
public void initInfoProvidesCanBeReplaced() throws Exception { public void initInfoProvidesCanBeReplaced() throws Exception {
assertThatPlaceholderCanBeReplaced("initInfoProvides"); assertThatPlaceholderCanBeReplaced("initInfoProvides");

Loading…
Cancel
Save