Fix doRun writing the wrong PID to the run file

This commit is contained in:
Ben Peddell 2016-08-26 17:28:03 +10:00
parent 7efbbd3fdf
commit fac21dd9a8

View File

@ -656,7 +656,8 @@ doRun() {
exit 1
fi
echo "$$" >"${arkserverroot}/${arkmanagerpidfile}"
# $$ returns the main process, $BASHPID returns the current process
echo "$BASHPID" >"${arkserverroot}/${arkmanagerpidfile}"
if [ -f "${arkserverroot}/.ark-update.lock" ]; then
local updatepid="$(<"${arkserverroot}/.ark-update.lock")"