From f19ddd6dfe2afd312a19f12cf64a6bbb27a23d9d Mon Sep 17 00:00:00 2001 From: Sughosha Date: Fri, 4 Jul 2025 17:59:51 +0530 Subject: services: readymedia: Fix configurations. * gnu/services/upnp.scm (%readymedia-default-log-directory): Remove variable. (%readymedia-default-log-file): New procedure. (%readymedia-default-cache-directory): Turn it into a procedure. ()[log-directory]: Remove field. [log-file]: New field. [cache-directory]: Set to %readymedia-default-cache-directory. (readymedia-configuration->config-file): Remove "user" and "log_dir" fields. (readymedia-shepherd-service)[modules]: Add (shepherd support). [start]: Do not map the log-directory. For home services, do not wrap the program with least-authority-wrapper. (readymedia-activation): Do not create the log-directory. * gnu/home/services/upnp.scm (%readymedia-cache-file, %readymedia-cache-path, %readymedia-log-path): Remove variables. (run-readymedia-test): Use the procedures properly. Do not test the log directory. Test the log file. * doc/guix.texi (Miscellaneous Services)[DLNA/UPnP Services]: Update doc. Change-Id: I97d84b5287c374ddb26a495f20a36f986b0c142d Signed-off-by: Giacomo Leidi --- doc/guix.texi | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index a3b17578a8f..78f9ffc3128 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46886,15 +46886,19 @@ A custom name that will be displayed on connected clients. The list of media folders to serve content from. Each item is a @code{readymedia-media-directory}. -@item @code{cache-directory} (default: @code{"/var/cache/readymedia"}) (type: string) -A folder for ReadyMedia's cache files. If not existing already, the -folder will be created as part of the service activation and the -ReadyMedia user will be assigned ownership. - -@item @code{log-directory} (default: @code{"/var/log/readymedia"}) (type: string) -A folder for ReadyMedia's log files. If not existing already, the -folder will be created as part of the service activation and the -ReadyMedia user will be assigned ownership. +@item @code{cache-directory} (type: gexp-or-string) +A folder for ReadyMedia's cache files, defaulting to +@file{"/var/cache/readymedia"}. If the path is relative, like +@file{".cache/readymedia"}, it will be looked up in the user's home +directory. If the directory does not exist already, the folder will be +created as part of the service activation and the "readymedia" user will +be assigned ownership. For Guix Home services, the value defaults to +@file{".cache/readymedia"}. + +@item @code{log-file} (type: gexp-or-string) +Where the service will write its logs, defaulting to +@file{"/var/log/readymedia.log"}. For Guix Home services, it defaults to +@file{@env{XDG_STATE_HOME}/shepherd/readymedia.log}. @item @code{port} (default: @code{#f}) (type: maybe-integer) A custom port that the service will be listening on. -- cgit v1.3