[HLCC-ICE-000001][ZY-CONTRIB-20260723-001] feat: 以来光者贡献链启用冰朔第五域个人子频道
This commit is contained in:
commit
5615453e4e
660 changed files with 122355 additions and 0 deletions
23
server-tools/hololake-code-channel/stop-candidate.sh
Executable file
23
server-tools/hololake-code-channel/stop-candidate.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
readonly HLCC_ROOT="/var/lib/guanghu/code-channel/candidates/hlcc-v16.0.1"
|
||||
readonly HLCC_PID_FILE="${HLCC_ROOT}/hlcc.pid"
|
||||
|
||||
if [[ "$(id -un)" != "guanghu" ]]; then
|
||||
echo "Refusing to stop a domestic isolated candidate as any user other than guanghu." >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [[ ! -f "${HLCC_PID_FILE}" ]]; then
|
||||
echo "HLCC candidate PID file does not exist."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
readonly candidate_pid="$(cat "${HLCC_PID_FILE}")"
|
||||
if kill -0 "${candidate_pid}" 2>/dev/null; then
|
||||
kill "${candidate_pid}"
|
||||
fi
|
||||
|
||||
rm "${HLCC_PID_FILE}"
|
||||
echo "HLCC isolated candidate stopped."
|
||||
Loading…
Reference in a new issue