Available

amalgame-service

SIGTERM / SIGINT + Windows SCM dispatcher.

amc package add service GitHub ↗ ← Back to the ecosystem

Overview

Cross-OS daemon/service integration. Linux/macOS: clean SIGTERM and SIGINT handling for graceful shutdown. Windows: native SCM dispatcher via sc.exe, no NSSM or third-party wrapper.

Features

  • Cross-OS SIGTERM / SIGINT handlers
  • Native Windows Service Control Manager (since v0.2)
  • systemd .service file generation (Linux)
  • install.sh / install.ps1 install/uninstall
  • Drain in-flight requests before exit

Example

Minimal usage example — copy-paste runnable after install.

amc package add service

let svc = Service.New("my-app")
svc.OnStart(fn() { startWebServer() })
svc.OnStop(fn()  { drainAndShutdown() })
svc.Run()

At a glance

Related packages