From 1b34dc830b74ba603c6769479560e42e2adee739 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Sun, 5 Apr 2026 16:13:06 -0400 Subject: [PATCH] Fix deploy.sh: don't prompt for systemd service if already installed Co-Authored-By: Claude Sonnet 4.6 --- deploy.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/deploy.sh b/deploy.sh index 1d77d28..7b06486 100755 --- a/deploy.sh +++ b/deploy.sh @@ -362,10 +362,12 @@ fi SERVICE_FILE="/etc/systemd/system/dataflow.service" -if confirm "Systemd Service"; then - if [ -f "$SERVICE_FILE" ]; then - info "already installed" - else +section "Systemd Service" +if [ -f "$SERVICE_FILE" ]; then + info "already installed" +else + read -p " Not installed. Install now? (requires sudo) [y/N]: " _yn + if [[ "$_yn" =~ ^[Yy]$ ]]; then step "Installing service" sudo cp "$SCRIPT_DIR/dataflow.service" "$SERVICE_FILE" && ok \ || fail "Could not install service" @@ -373,9 +375,9 @@ if confirm "Systemd Service"; then step "Enabling on boot" sudo systemctl daemon-reload && sudo systemctl enable dataflow > /dev/null 2>&1 && ok \ || fail "Could not enable service" + else + info "skipped" fi -else - info "skipped" fi # ── API Server ────────────────────────────────────────────────────────────────