Move fstrim to autostart so it doesn't block sleep.

This commit is contained in:
fewtarius 2022-09-23 15:25:38 -04:00
parent 714d917665
commit 0584e41b00
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
3 changed files with 2 additions and 3 deletions

View file

@ -0,0 +1,2 @@
SVC="fstrim.timer"
DAEMONS=("fstrim")

View file

@ -92,5 +92,4 @@ post_install () {
if [ "${SWAP_SUPPORT}" = "yes" ]; then
enable_service swap.service
fi
enable_service fstrim.timer
}

View file

@ -3,7 +3,5 @@ Description=Discard unused blocks on all filesystems
[Service]
Type=oneshot
# don't run immediately on boot when timer event was missed
ExecStartPre=-/usr/bin/sleep 20
ExecStart=-/usr/sbin/fstrim --all --verbose --quiet-unsupported
ExecStart=-/usr/bin/touch /storage/.cache/fstrim.run