Skip to content

Commit

Permalink
[docs](fdb_ctl) remove fdbmonitor.pid file when stopping fdb (#44053)
Browse files Browse the repository at this point in the history
  • Loading branch information
freesinger authored Nov 15, 2024
1 parent a80edb2 commit 61edf97
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 61edf97

Please sign in to comment.