Procházet zdrojové kódy

Skip touch app restart in update if service not installed

Check that the systemd service actually exists before attempting to
restart it, not just the directory. This prevents the confusing
"Unit dune-weaver-touch.service not found" error message.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris před 6 měsíci
rodič
revize
e6f5c83de8
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      dw

+ 2 - 2
dw

@@ -151,9 +151,9 @@ cmd_update() {
         sudo systemctl restart dune-weaver
     fi
 
-    # Update touch app if installed
+    # Update touch app if installed (check both directory and service exist)
     local touch_dir="$INSTALL_DIR/dune-weaver-touch"
-    if [[ -d "$touch_dir" ]]; then
+    if [[ -d "$touch_dir" ]] && systemctl list-unit-files dune-weaver-touch.service 2>/dev/null | grep -q dune-weaver-touch; then
         echo ""
         echo -e "${BLUE}Updating touch app...${NC}"
         cd "$touch_dir"