Commit 5afd6108 authored by Andy Wilkinson's avatar Andy Wilkinson

Merge branch '1.3.x

parents 5371722c 93ab0126
...@@ -110,6 +110,7 @@ fi ...@@ -110,6 +110,7 @@ fi
# Build the pid and log filenames # Build the pid and log filenames
if [[ "$identity" == "$init_script" ]] || [[ "$identity" == "$APP_NAME" ]]; then if [[ "$identity" == "$init_script" ]] || [[ "$identity" == "$APP_NAME" ]]; then
PID_FOLDER="$PID_FOLDER/${identity}" PID_FOLDER="$PID_FOLDER/${identity}"
pid_subfolder=$PID_FOLDER
fi fi
pid_file="$PID_FOLDER/${identity}.pid" pid_file="$PID_FOLDER/${identity}.pid"
log_file="$LOG_FOLDER/$LOG_FILENAME" log_file="$LOG_FOLDER/$LOG_FILENAME"
...@@ -147,6 +148,9 @@ do_start() { ...@@ -147,6 +148,9 @@ do_start() {
mkdir "$PID_FOLDER" &> /dev/null mkdir "$PID_FOLDER" &> /dev/null
if [[ -n "$run_user" ]]; then if [[ -n "$run_user" ]]; then
checkPermissions || return $? checkPermissions || return $?
if [[ -z "$pid_subfolder" ]]; then
chown "$run_user" "$pid_subfolder"
fi
chown "$run_user" "$pid_file" chown "$run_user" "$pid_file"
chown "$run_user" "$log_file" chown "$run_user" "$log_file"
if [ $USE_START_STOP_DAEMON = true ] && type start-stop-daemon > /dev/null 2>&1; then if [ $USE_START_STOP_DAEMON = true ] && type start-stop-daemon > /dev/null 2>&1; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment