feat: initial commit — void-installer multi-profile (stable-cinnamon + mainline-niri)
This commit is contained in:
19
tools/stop-xbps-proxy.sh
Executable file
19
tools/stop-xbps-proxy.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user