From a6721bdd6154e2bebd8ab07bf310c25629347a21 Mon Sep 17 00:00:00 2001 From: "Christopher R. Nelson" Date: Wed, 17 Jan 2024 21:05:37 -0500 Subject: Add shutdown command, and refactor server impl zmq: refactor server to functions add shutdown function (end recursion) media: fix bug with missing directories rh-client: support shutdown function rh-server: update to use build variables --- scripts/rh-server.in | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'scripts/rh-server.in') diff --git a/scripts/rh-server.in b/scripts/rh-server.in index 9749ec2..a9dd758 100755 --- a/scripts/rh-server.in +++ b/scripts/rh-server.in @@ -1,4 +1,5 @@ -#!/usr/bin/env guile +#!@GUILE@ \ +--no-auto-compile -e main -s !# (use-modules (srfi srfi-1) (config) @@ -38,7 +39,7 @@ (character #f)) (switch (name 'serve) - (synopsis "server the media heap") + (synopsis "serve the media heap") (default #f) (test boolean?) (character #t)) @@ -51,16 +52,17 @@ "/reading-heap/")) (eager? #t)))) (parser sexp-parser) - (copyright '(2023)) - (version "0.1") - (license agpl3+) - (author "Christopher R. Nelson"))) + (copyright @COPYRIGHT@) + (version @HVERSION@) + (license @LICENSE@) + (author @AUTHOR@))) (define (main cmd-line) (let ((options (getopt-config-auto cmd-line config))) (when (option-ref options 'write) (options-write options)) - (when (option-ref options 'serve) + (when (or (option-ref options 'serve) + (not (option-ref options 'write))) (let* ((media (filetree->media-list (option-ref options 'media-library))) (priorities (map media-priority media)) (heap (fold heap-insert 'E priorities media))) -- cgit v1.2.3