Re: Debian Buster release to partially drop non-systemd support
- To: debian-devel@lists.debian.org
- Subject: Re: Debian Buster release to partially drop non-systemd support
- From: kjonca@poczta.onet.pl (Kamil Jońca)
- Date: Thu, 18 Oct 2018 08:46:10 +0200
- Message-id: <[🔎] 87y3aviwgd.fsf@alfa.kjonca>
- In-reply-to: <wK9P4-2rM-9@gated-at.bofh.it> (Jonathan Dowland's message of "Thu, 18 Oct 2018 08:20:02 +0200")
- References: <wJuLT-2WB-11@gated-at.bofh.it> <wJw1j-3Cb-5@gated-at.bofh.it> <wJwNI-480-15@gated-at.bofh.it> <wJx73-4eR-11@gated-at.bofh.it> <wJxgK-4xe-13@gated-at.bofh.it> <wJMfL-57C-7@gated-at.bofh.it> <wK1y9-5RR-3@gated-at.bofh.it> <wK1y9-5RR-1@gated-at.bofh.it> <wK5ip-83v-1@gated-at.bofh.it> <wK7Dz-WJ-3@gated-at.bofh.it> <wK9P4-2rM-9@gated-at.bofh.it>
Jonathan Dowland <jmtd@debian.org> writes:
> On Wed, Oct 17, 2018 at 08:33:47PM -0700, Russ Allbery wrote:
>>MAILTO was the main thing that I remember missing in terms of pure
>>functionality.
>
> This is not a complete substitute for all uses of MAILTO, but I found
> the following useful so I share it in case you weren't aware of it.
>
> Define a service specifically designed for sending status emails:
>
> status-email-user@.service:
>> [Service]
>> Type=oneshot
>> ExecStart=-/usr/local/bin/systemd-email %i
>> User=nobody
>> Group=systemd-journal
>
> (I also switch on a little status LED I have with another ExecStart
> line)
>
> /usr/local/bin/systemd-email:
>> systemctl status --full "$1" | mail -s "unit $1 failed" root
>
> Put an OnFailure= line in systemd units that you want to mail you if
> they go wrong
>
>> [Unit]
>> OnFailure=status-email-user@%n.service
But this not play well with exim4.
See:
https://lists.freedesktop.org/archives/systemd-devel/2018-September/041417.html
(and thread as a whole)
KJ
--
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
Disks travel in packs.
Reply to: