From: Tomas Volf <~@wolfsden.cz>
To: Tristan Kohl <blobbyjj@ymail.com>
Cc: help-guix@gnu.org
Subject: Re: How to configure smartd and send notifications?
Date: Tue, 21 May 2024 17:50:27 +0200 [thread overview]
Message-ID: <ZkzCwz6qJkXI2RVB@ws> (raw)
In-Reply-To: <79C29ABD-8FFC-4930-A8E0-798ABF4EEB11@ymail.com>
[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]
On 2024-05-21 17:33:24 +0200, Tristan Kohl via wrote:
> Hello Felix,
>
> my last message was not to critizise your help but rather my frustration with my own limited progress. I really appreciate the help!
>
> program-file at least results in a usable thing however since the script gets executed by smard I get the "command not found" in my logs. It seems like curl is not in PATH for smartd. Do I need to import something into the gexp?
>
> Also those env variables are defined by smartd during runtime depending on which drive produced the error. Therefore I need shell expansion/env variables and have to use system (without *) imho.
>
> This is the current state:
>
> (define-smartd-send-ntfy
> (program-file "send-ntfy"
> #~(system
> (string-append "curl " "-H \"Title: $SMARTD_SUBJECT\" " ...))))
Ignoring the obvious quoting issues here (what Felix does with `getenv' seems
much safer, and should produce the same result?),
>
> Note: when using system* the error is:
> In execvp of curl: No such file or directory
This should be solvable by using `file-append', so, basing on the system*
variant, something like:
#~(system* #$(file-append curl "/bin/curl") <other-arguments-here>)
Should invoke curl by absolute path. (You need import (gnu packages curl) of
course.)
Hope this helps,
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-05-21 15:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4D873504-6540-477A-A2DB-DE293395CAFC.ref@ymail.com>
2024-05-19 22:48 ` How to configure smartd and send notifications? Tristan Kohl via
2024-05-20 11:30 ` Felix Lechner via
2024-05-20 13:56 ` Tristan Kohl via
2024-05-20 15:04 ` Felix Lechner via
2024-05-20 19:15 ` Tristan Kohl via
2024-05-20 23:42 ` Felix Lechner via
2024-05-21 15:33 ` Tristan Kohl via
2024-05-21 15:50 ` Tomas Volf [this message]
2024-05-23 19:25 ` Tristan Kohl via
2024-05-24 4:10 ` Felix Lechner via
2024-05-24 10:19 ` Tomas Volf
2024-05-31 13:42 ` Tristan Kohl via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZkzCwz6qJkXI2RVB@ws \
--to=~@wolfsden.cz \
--cc=blobbyjj@ymail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).