Browse Source

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 tuần trước cách đây
mục cha
commit
e6f5c83de8
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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"