#!/bin/bash # Stop the XBPS caching proxy. set -euo pipefail PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" PIDFILE="${XBPS_PROXY_PIDFILE:-$PROJECT_DIR/out/xbps-proxy.pid}" if [[ -f "$PIDFILE" ]]; then PID="$(cat "$PIDFILE")" if kill -0 "$PID" 2>/dev/null; then kill "$PID" echo ">>> XBPS proxy stopped (pid $PID)" else echo ">>> XBPS proxy not running (stale pidfile)" fi rm -f "$PIDFILE" else echo ">>> no XBPS proxy pidfile found" fi