✨ Added fstrim notify/script
This commit is contained in:
parent
bcef73bf77
commit
c35d55f2d3
2 changed files with 18 additions and 0 deletions
7
scripts/fstrim_notify.sh
Executable file
7
scripts/fstrim_notify.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# simple cron script to notify to possibly run trim script
|
||||
LAST_UPDATE=$(cat "$HOME"/.fsdate)
|
||||
|
||||
notify-send "fstrim alert!, last fstrim on:
|
||||
${LAST_UPDATE}"
|
||||
11
scripts/trim
Executable file
11
scripts/trim
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
# this script is meant to simply notify to fstrim
|
||||
# it also updates a .fsdate file in $HOME with the date of the last fstrim
|
||||
|
||||
# allows to overwrite .fsdate file
|
||||
set +o noclobber
|
||||
|
||||
doas fstrim --all --verbose --minimum 1048576 &&
|
||||
notify-send " fstrim completed!!"
|
||||
|
||||
date > "$HOME/.fsdate"
|
||||
Loading…
Add table
Add a link
Reference in a new issue