Make the name of the log file produced by launch script configurable
Previously, the launch script would always use a file named <appname>.log to capture the application's console output. This commit adds a variable, LOG_FILENAME, for specifying the file name defaulting to <appname>.log. Fixes gh-4194
This commit is contained in:
committed by
Andy Wilkinson
parent
fd525077bd
commit
e4230e61d7
@@ -61,7 +61,8 @@ if [[ -z "$identity" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Initialize log file name if not provided by the config file
|
||||
[[ -z "$LOG_FILENAME" ]] && LOG_FILENAME="${identity}.log"
|
||||
|
||||
|
||||
# ANSI Colors
|
||||
@@ -91,7 +92,7 @@ if [[ "$identity" == "$init_script" ]] || [[ "$identity" == "$APP_NAME" ]]; then
|
||||
PID_FOLDER="$PID_FOLDER/${identity}"
|
||||
fi
|
||||
pid_file="$PID_FOLDER/${identity}.pid"
|
||||
log_file="$LOG_FOLDER/${identity}.log"
|
||||
log_file="$LOG_FOLDER/$LOG_FILENAME"
|
||||
|
||||
# Determine the user to run as if we are root
|
||||
[[ $(id -u) == "0" ]] && run_user=$(ls -ld "$jarfile" | awk '{print $3}')
|
||||
|
||||
Reference in New Issue
Block a user