fix(mx): fix check_root email subject and consolidate systemd attrsets
The check_root service incorrectly used '/boot Disk Space Alert' as the email subject instead of '/ Disk Space Alert'. Also merged the duplicate systemd.services and systemd.timers attribute sets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d11199da10
commit
dc4594333f
1 changed files with 7 additions and 13 deletions
|
|
@ -118,18 +118,6 @@
|
||||||
};
|
};
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
systemd.timers = {
|
|
||||||
check_boot = {
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "daily";
|
|
||||||
};
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services = {
|
|
||||||
check_root = {
|
check_root = {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
@ -140,7 +128,7 @@
|
||||||
THRESHOLD=85
|
THRESHOLD=85
|
||||||
|
|
||||||
if [ "$CURRENT" -gt "$THRESHOLD" ] ; then
|
if [ "$CURRENT" -gt "$THRESHOLD" ] ; then
|
||||||
${pkgs.mailutils}/bin/mail -s '/boot Disk Space Alert' harald << EOF
|
${pkgs.mailutils}/bin/mail -s '/ Disk Space Alert' harald << EOF
|
||||||
Your root partition remaining free space is critically low. Used: $CURRENT%
|
Your root partition remaining free space is critically low. Used: $CURRENT%
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
@ -152,6 +140,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.timers = {
|
systemd.timers = {
|
||||||
|
check_boot = {
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "daily";
|
||||||
|
};
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
check_root = {
|
check_root = {
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "daily";
|
OnCalendar = "daily";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue