auto-save 2026-05-15 11:29 (+1, ~3)

This commit is contained in:
2026-05-15 11:29:23 +08:00
parent e6b2768482
commit 55a9a9d936
5 changed files with 83 additions and 26 deletions

View File

@@ -3,6 +3,16 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PID_DIR="$ROOT_DIR/.pids"
LAUNCHD_DOMAIN="gui/$(id -u)"
stop_launchd_label() {
local label="$1"
if launchctl bootout "$LAUNCHD_DOMAIN" "$label" >/dev/null 2>&1; then
echo "$label stopped"
else
echo "$label not loaded"
fi
}
stop_pid_file() {
local name="$1"
@@ -24,3 +34,5 @@ stop_pid_file() {
stop_pid_file api
stop_pid_file web
stop_launchd_label com.skg.tk-recreate.api.dev
stop_launchd_label com.skg.tk-recreate.web.dev