mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
Dev temp file/cache cleanip
This commit is contained in:
committed by
firestar5683
parent
5a5de70303
commit
28d1ef85e6
@@ -204,6 +204,13 @@ cleanup() {
|
||||
wait "${REPLAY_PID}" >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
if [[ -n "${OPENPILOT_PREFIX:-}" && "${OPENPILOT_PREFIX}" == desktop-onroad-* ]]; then
|
||||
echo "Cleaning up temporary prefix environment (${OPENPILOT_PREFIX})..."
|
||||
rm -rf "/dev/shm/msgq_${OPENPILOT_PREFIX}"
|
||||
rm -rf "/tmp/comma_download_cache${OPENPILOT_PREFIX}"
|
||||
rm -rf "${HOME}/.comma${OPENPILOT_PREFIX}"
|
||||
fi
|
||||
|
||||
exit "${exit_code}"
|
||||
}
|
||||
|
||||
@@ -239,6 +246,7 @@ prepare_env() {
|
||||
unset OPENPILOT_PREFIX
|
||||
else
|
||||
export OPENPILOT_PREFIX="${PREFIX_ARG:-${OPENPILOT_PREFIX:-desktop-onroad-$$}}"
|
||||
mkdir -p "/dev/shm/msgq_${OPENPILOT_PREFIX}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user