From 2eb819826710c05984d1dceeff69cc8dc1e867a4 Mon Sep 17 00:00:00 2001 From: NixReaper Date: Sat, 25 Apr 2026 21:38:56 -0500 Subject: [PATCH] fix: stop nixpanel service before overwriting binary to avoid text file busy error on reinstall --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 3892c80..a2fd67f 100644 --- a/install.sh +++ b/install.sh @@ -252,8 +252,9 @@ if ! step_done "build_panel"; then apt-get install -y -qq upx-ucl 2>/dev/null || true fi - # Main API binary + # Main API binary — stop service first so the file isn't busy if [[ -f "target/release/nixpanel" ]]; then + systemctl stop nixpanel 2>/dev/null || true cp target/release/nixpanel "$BIN_DIR/nixpanel" chmod 755 "$BIN_DIR/nixpanel" command -v upx &>/dev/null && upx --best --quiet "$BIN_DIR/nixpanel" 2>/dev/null || true