From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id kIMLJ/7fS2ZyEQEAe85BDQ:P1 (envelope-from ) for ; Tue, 21 May 2024 01:42:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id kIMLJ/7fS2ZyEQEAe85BDQ (envelope-from ) for ; Tue, 21 May 2024 01:42:54 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=i6pfL2zY; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716248574; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ck96z/wqN+HP3IrEm9u0Hj8lNUbY0t+V30mU/1cNyMQ=; b=AKkDROponN9hSCfxH+sF9K12+sa2aThRBQSw9rpjXmFFqw9auUW8vsnVMtbuB5WK1klbWG Q70IhFzuh9xCAtZfP1mZFebMe2OLFeidzfGJkZYUoCjGWma3G6FXMn2Y0OPIqAc/C6tU5o ZWLdw9yQQAxaiF2IfnxitqoP1zWoMym3p6D9Uux1FixdO98PwEEFnq1k8j1s7AfjgiGlrl 4UIzRKcEMSI5LwrkI1Hp09HJd9E7UcRFkv9EI4mH1IIWv4+WUkd4Kv++GX7B6QqvZs+WVu PUTxZXyAuhARUcejS/TTIKU0lCLeigW/hG74SNbLcviboTZENOyihN8ifYihNg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=i6pfL2zY; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716248574; a=rsa-sha256; cv=none; b=XTcTnu2nwFxxkQ7CNFxtKovI+u10j1vR/ZfW3+caSMmEtloYH5N+Q9gKm6BdW72e81JhQ+ s1//KFppwhgHNLZ1WV3r9yGL1PcWLCO87QOPOLFylzm2K6WnVGOJGaV4SiFY7NyDfeHc32 o5WAPOTkec8MB2BkbuOA4SiJzw1pbTOVkMTgZEnC9PJJtebr1mqd2rrSZqdAnv2elmHIeh Gwhn0TCvTHiA6KVgRWh/Ploc9SqdDSSt2zycSftDw6T4XE4M8b8z3YJ40nUr6EOfjmZ6cp kGPjdrQBBr59EoeIxpjmuXHvDpWucPg4sDJAhPtxNlgBNmTbuqi01Hj3PyJnuQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 351ED21613 for ; Tue, 21 May 2024 01:42:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9Ce6-0003uc-B4; Mon, 20 May 2024 19:42:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9Ce5-0003tt-71 for help-guix@gnu.org; Mon, 20 May 2024 19:42:21 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1s9Ce0-0002oi-Uq for help-guix@gnu.org; Mon, 20 May 2024 19:42:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=mtbUiwe/gzBMbA0 BZdfgPxGPyUrqh37bTCv15yZOGY0=; h=date:references:in-reply-to:subject: cc:to:from; d=lease-up.com; b=i6pfL2zY7kOMRLxsnPiXW11Roe+3wALf653UmeR6 5Jgo/wEpmSwfQwrLxzKZn3lw1HH1DZcTpeW5Mo+pVJ8uyWlOaTdNC06nwejKs5VXARaYyo kDrgC/Zx8GtyqOBt8nSGuUF+8pV7RDbQmbNvvCo7Eg10v/hDho4HfZ70qhfYo= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 71a4d448 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Mon, 20 May 2024 23:42:02 +0000 (UTC) To: Tristan Kohl , help-guix@gnu.org Cc: Subject: Re: How to configure smartd and send notifications? In-Reply-To: <0525BF4D-96C2-4F58-BB27-19A88DD8403E@ymail.com> References: <4D873504-6540-477A-A2DB-DE293395CAFC.ref@ymail.com> <4D873504-6540-477A-A2DB-DE293395CAFC@ymail.com> <87seycu3df.fsf@lease-up.com> <87msokttht.fsf@lease-up.com> <0525BF4D-96C2-4F58-BB27-19A88DD8403E@ymail.com> Date: Mon, 20 May 2024 16:42:02 -0700 Message-ID: <87jzjot5it.fsf@lease-up.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=208.82.101.137; envelope-from=felix.lechner@lease-up.com; helo=sail-ipv4.us-core.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Felix Lechner From: Felix Lechner via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -5.48 X-Migadu-Queue-Id: 351ED21613 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.48 X-TUID: kadsfrOB8dZm Hi Tristan, On Mon, May 20 2024, Tristan Kohl via wrote: > smartd then complains that the file is not executable... Sorry, it was a Monday morning for me. If you are comfortable using Guile---which I'm sure you almost are by now--You can use 'program-file': Please have a look at any of these hooks on one of my systems. [1] An untested version of your script might look something like this, although I probably got some of the quoting wrong---either in Scheme or in your command. (define smartd-send-ntfy (program-file "send-ntfy" #~((let* ((subject (getenv "SMARTD_SUBJECT)) (device (getenv "SMARTD_DEVICE)) (failure-type (getenv "SMARTD_FAILTYPE)) (timestamp (getenv "SMARTD_TFIRST")) (message (getenv "SMARTD_MESSAGE"))) (system* "curl" "ntfy.sh/" "-d" (string-join `("curl" "-Ls" "-H" ,(string-append "Title: " subject) "-d" ,subject "-d" ,(string-append "'" (string-join (list "Device:" device "Time:" timestamp "Message:" message)) "'")))))))) Kind regards Felix [1] https://codeberg.org/lechner/system-config/src/commit/215fc20a29e553fd8108ba737d557ecb98279540/host/wallace-server/operating-system.scm#L1134-L1168