Browse Source

Add CONF_FOLDER property

Closes gh-5203
pull/5204/merge
Uwe Schaefer 10 years ago committed by Stephane Nicoll
parent
commit
9c3003071b
  1. 3
      spring-boot-docs/src/main/asciidoc/deployment.adoc
  2. 6
      spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script

3
spring-boot-docs/src/main/asciidoc/deployment.adoc

@ -571,6 +571,9 @@ the default behavior in a script or on the command line: @@ -571,6 +571,9 @@ the default behavior in a script or on the command line:
|`LOG_FOLDER`
|The name of the folder to put log files in (`/var/log` by default).
|`CONF_FOLDER`
|The name of the folder to read .conf files from (same folder as jar-file by default).
|`LOG_FILENAME`
|The name of the log file in the `LOG_FOLDER` (`<appname>.log` by default).

6
spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script

@ -42,8 +42,12 @@ cd "$WORKING_DIR" || exit 1 @@ -42,8 +42,12 @@ cd "$WORKING_DIR" || exit 1
# Source any config file
configfile="$(basename "${jarfile%.*}.conf")"
# Initialize CONF_FOLDER location defaulting to jarfolder
[[ -z "$CONF_FOLDER" ]] && CONF_FOLDER="${jarfolder}"
# shellcheck source=/dev/null
[[ -r "${jarfolder}/${configfile}" ]] && source "${jarfolder}/${configfile}"
[[ -r "${CONF_FOLDER}/${configfile}" ]] && source "${CONF_FOLDER}/${configfile}"
# Initialize PID/LOG locations if they weren't provided by the config file
[[ -z "$PID_FOLDER" ]] && PID_FOLDER="{{pidFolder:/var/run}}"

Loading…
Cancel
Save