mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
created health check for btrfs
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Check btrfs status
|
||||
OnFailure=systemd-email@%n.service
|
||||
OnSuccess=systemd-email@%n.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash /home/administrator/scripts/btrfs-health-check/btrfs-health-check.sh
|
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Checks the healt of all btrfs volumes
|
||||
for path in $(btrfs filesystem show | awk '/ path /{print $NF}')
|
||||
do
|
||||
btrfs device stats $path
|
||||
done
|
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=starts btrfs-health-check.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=12:00
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Reference in New Issue
Block a user