Skip to content

Fix daemon crash on fresh install (missing log directory) - #20

Merged
CalebisGross merged 1 commit into
mainfrom
fix/daemon-log-dir-creation
Feb 28, 2026
Merged

CalebisGross merged 1 commit into
mainfrom
fix/daemon-log-dir-creation

Conversation

@CalebisGross

Copy link
Copy Markdown
Collaborator

Summary

  • Install() in both service_linux.go and service_darwin.go wrote a service config pointing at ~/.mnemonic/mnemonic.log but never created the ~/.mnemonic/ directory
  • On a fresh Linux machine, systemd immediately exits with code 209 (STDOUT) because the StandardOutput=append: target path doesn't exist
  • Fixed by adding os.MkdirAll for the log directory during install, matching the pattern already used in daemon.Start()

Test plan

  • Tested full lifecycle on Linux (Ubuntu 24.04, systemd 255): install → start → status → stop → uninstall
  • Service starts and stays running after fix
  • make test passes (all 10 packages, zero failures)
  • go vet clean
  • Verify macOS launchd path still works (same pattern, not tested on this machine)

🤖 Generated with Claude Code

Install() wrote a unit/plist pointing at ~/.mnemonic/mnemonic.log but
never created the directory. On a fresh machine systemd exits immediately
with code 209 (STDOUT) because the append target doesn't exist. Fixed
for both Linux (systemd) and macOS (launchd).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CalebisGross
CalebisGross merged commit 7238849 into main Feb 28, 2026
3 checks passed
@CalebisGross
CalebisGross deleted the fix/daemon-log-dir-creation branch February 28, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant