Skip to content

Commit

Permalink
branch-3.0: [docs](fdb_ctl) remove fdbmonitor.pid file when stopping …
Browse files Browse the repository at this point in the history
…fdb #44053 (#44055)

Cherry-picked from #44053

Co-authored-by: Shane <[email protected]>
  • Loading branch information
github-actions[bot] and freesinger authored Nov 17, 2024
1 parent 43facc4 commit 0de6586
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/fdb/fdb_ctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,14 @@ function start_fdb() {
}

function stop_fdb() {
if [[ -f "${FDB_HOME}/fdbmonitor.pid" ]]; then
fdb_pid_file="${FDB_HOME}/fdbmonitor.pid"
if [[ -f "${fdb_pid_file}" ]]; then
local fdb_pid
fdb_pid=$(cat "${FDB_HOME}/fdbmonitor.pid")
fdb_pid=$(cat "${fdb_pid_file}")
if ps -p "${fdb_pid}" >/dev/null; then
echo "Stop fdbmonitor with pid ${fdb_pid}"
kill -9 "${fdb_pid}"
rm -f "${fdb_pid_file}"
fi
fi
}
Expand Down

0 comments on commit 0de6586

Please sign in to comment.