mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Another big round of refactoring and cleaning...
This commit is contained in:
15
roles/sys-alm-email/templates/sys-alm-email.sh.j2
Normal file
15
roles/sys-alm-email/templates/sys-alm-email.sh.j2
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
/usr/bin/sendmail -t <<ERRMAIL
|
||||
To: {{ users.administrator.email }}
|
||||
From: systemd <{{ users['no-reply'].email }}>
|
||||
Subject: $1
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
|
||||
A problem with the service $1 occured:
|
||||
|
||||
$(systemctl status --full "$1" | head -n 30)
|
||||
|
||||
|
||||
ERRMAIL
|
8
roles/sys-alm-email/templates/sys-alm-email@.service.j2
Normal file
8
roles/sys-alm-email/templates/sys-alm-email@.service.j2
Normal file
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=status email for %i to user
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash {{systemd_notifier_email_folder}}sys-alm-email.sh %i
|
||||
User=root
|
||||
Group=systemd-journal
|
Reference in New Issue
Block a user