Skip to content

feat(awn): implement daemon stop, fix install.sh#162

Merged
Jing-yilin merged 1 commit into
mainfrom
fix/install-script
Mar 24, 2026
Merged

feat(awn): implement daemon stop, fix install.sh#162
Jing-yilin merged 1 commit into
mainfrom
fix/install-script

Conversation

@Jing-yilin
Copy link
Copy Markdown
Contributor

Changes

awn daemon stop

  • Added POST /ipc/shutdown endpoint on the daemon that triggers graceful shutdown
  • CLI sends IPC shutdown request; falls back to SIGTERM via PID file if IPC unreachable
  • PID file (daemon.pid) written alongside daemon.port on start, cleaned up on stop

install.sh fixes

  • Fixed get_latest_version() — was broken due to bad sed parsing of GitHub API JSON
  • Default install dir changed from /usr/local/bin (needs sudo) to ~/.local/bin
  • Added mkdir -p for install dir and PATH hint if not in PATH
  • Fixed set -u trap bug with temp dir cleanup

One-liner install

curl -fsSL https://raw.githubusercontent.com/ReScienceLab/agent-world-network/main/packages/awn-cli/install.sh | bash

Testing

  • 44/44 Rust tests pass
  • 218/218 TS tests pass
  • E2E verified: daemon startstatusdaemon stop → verify stopped

- Add POST /ipc/shutdown endpoint for graceful daemon shutdown
- Implement 'awn daemon stop' with IPC call + PID file SIGTERM fallback
- Write/clean PID file (daemon.pid) alongside port file
- Fix install.sh: robust version parsing, default to ~/.local/bin,
  add PATH hint, no sudo required
@Jing-yilin Jing-yilin merged commit dc3d3c2 into main Mar 24, 2026
4 checks passed
@Jing-yilin Jing-yilin deleted the fix/install-script branch March 24, 2026 11:44
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