Create PID_FOLDER if it doesn't exist

In fact the folder was already created if the app is running as
a different user, but not if running as the current user, so it
was just a question of moving one line out of an if block.

Fixes gh-5986
This commit is contained in:
Dave Syer
2016-06-14 09:53:32 +01:00
parent b11457f5a2
commit e4b544bd39

View File

@@ -140,8 +140,8 @@ start() {
do_start() {
working_dir=$(dirname "$jarfile")
pushd "$working_dir" > /dev/null
mkdir "$PID_FOLDER" &> /dev/null
if [[ -n "$run_user" ]]; then
mkdir "$PID_FOLDER" &> /dev/null
checkPermissions || return $?
chown "$run_user" "$PID_FOLDER"
chown "$run_user" "$pid_file"