From 65a298d8be42b22925db3828c91225954685483b Mon Sep 17 00:00:00 2001 From: James Brechtel Date: Sat, 20 Jun 2026 15:29:50 -0400 Subject: [PATCH] feat: add scripts/stop --- docs/specs/2026-06-20-initial-scaffold-design.md | 9 ++++----- scripts/stop | 8 ++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100755 scripts/stop diff --git a/docs/specs/2026-06-20-initial-scaffold-design.md b/docs/specs/2026-06-20-initial-scaffold-design.md index d14247e..a2cf5fb 100644 --- a/docs/specs/2026-06-20-initial-scaffold-design.md +++ b/docs/specs/2026-06-20-initial-scaffold-design.md @@ -24,7 +24,8 @@ simple (one language, two packages) and is adequate for Spine's complexity level ``` spine/ ├── scripts/ -│ └── run # start the server as a daemon +│ ├── run # start the server as a daemon +│ └── stop # stop the daemon ├── spine.el # entry point: bootstrap, server start, handlers ├── templates/ │ └── hello.mustache # smoke-test template @@ -141,12 +142,10 @@ scripts/run [HOST:]PORT ``` - `scripts/run 9090` → `http://localhost:9090/hello` -- `scripts/run 0.0.0.0:8080` → `http://0.0.0.0:8080/hello` (all interfaces) -- `scripts/run` → `http://localhost:8080/hello` - -Stop: `emacsclient --socket-name=spine --eval '(kill-emacs)'` +Stop: `scripts/stop` The socket name `spine` is separate from the default Emacs daemon socket, + so your personal daemon is unaffected. Development use — interactive Emacs in the terminal: diff --git a/scripts/stop b/scripts/stop new file mode 100755 index 0000000..0cb0370 --- /dev/null +++ b/scripts/stop @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail + +emacsclient --socket-name=spine --eval '(kill-emacs)' 2>/dev/null || { + echo "Spine daemon is not running" + exit 1 +} +echo "Spine stopped"