Merge branch '1.4.x' into 1.5.x
This commit is contained in:
@@ -145,7 +145,7 @@ start() {
|
||||
do_start() {
|
||||
working_dir=$(dirname "$jarfile")
|
||||
pushd "$working_dir" > /dev/null
|
||||
mkdir "$PID_FOLDER" &> /dev/null
|
||||
mkdir -p "$PID_FOLDER" &> /dev/null
|
||||
if [[ -n "$run_user" ]]; then
|
||||
checkPermissions || return $?
|
||||
if [[ -z "$pid_subfolder" ]]; then
|
||||
@@ -180,6 +180,8 @@ do_start() {
|
||||
}
|
||||
|
||||
stop() {
|
||||
working_dir=$(dirname "$jarfile")
|
||||
pushd "$working_dir" > /dev/null
|
||||
[[ -f $pid_file ]] || { echoYellow "Not running (pidfile not found)"; return 0; }
|
||||
pid=$(cat "$pid_file")
|
||||
isRunning "$pid" || { echoYellow "Not running (process ${pid}). Removing stale pid file."; rm -f "$pid_file"; return 0; }
|
||||
@@ -202,6 +204,8 @@ restart() {
|
||||
}
|
||||
|
||||
force_reload() {
|
||||
working_dir=$(dirname "$jarfile")
|
||||
pushd "$working_dir" > /dev/null
|
||||
[[ -f $pid_file ]] || { echoRed "Not running (pidfile not found)"; return 7; }
|
||||
pid=$(cat "$pid_file")
|
||||
rm -f "$pid_file"
|
||||
@@ -211,6 +215,8 @@ force_reload() {
|
||||
}
|
||||
|
||||
status() {
|
||||
working_dir=$(dirname "$jarfile")
|
||||
pushd "$working_dir" > /dev/null
|
||||
[[ -f "$pid_file" ]] || { echoRed "Not running"; return 3; }
|
||||
pid=$(cat "$pid_file")
|
||||
isRunning "$pid" || { echoRed "Not running (process ${pid} not found)"; return 1; }
|
||||
|
||||
Reference in New Issue
Block a user