summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-07-11 20:47:49 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-07-11 20:47:49 +0900
commitb3066893bf14622f716f8ca5d6def845cd76e56f (patch)
tree785006d67fcfaf902a7b22bbf75aaebf1f417264
parent89e42d469a48fcf5e2eb54e5fc67c8a7c38fc41a (diff)
Fix ExecStop failure when tmux session has already exitedHEADmaster
The `-` prefix tells systemd to ignore the exit code of tmux kill-session, so restart succeeds even when the claude process has crashed and the session no longer exists. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rw-r--r--claude/systemd/claude-code@.service2
1 files changed, 1 insertions, 1 deletions
diff --git a/claude/systemd/claude-code@.service b/claude/systemd/claude-code@.service
index e3983b6..e85507e 100644
--- a/claude/systemd/claude-code@.service
+++ b/claude/systemd/claude-code@.service
@@ -7,7 +7,7 @@ Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/home/yyamashita/workspaces/repos/%i
ExecStart=/usr/bin/tmux new-session -d -s claude-%i -c /home/yyamashita/workspaces/repos/%i /usr/local/bin/claude --remote-control %i --dangerously-skip-permissions
-ExecStop=/usr/bin/tmux kill-session -t claude-%i
+ExecStop=-/usr/bin/tmux kill-session -t claude-%i
Environment=HOME=/home/yyamashita
Environment=USER=yyamashita
Environment=XDG_RUNTIME_DIR=/run/user/1000