Преглед на файлове

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 преди 4 седмици
родител
ревизия
e6f5c83de8
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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"