Fix deploy.sh: don't prompt for systemd service if already installed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0994d48383
commit
1b34dc830b
14
deploy.sh
14
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 ────────────────────────────────────────────────────────────────
|
||||
|
||||
Loading…
Reference in New Issue
Block a user