dotfiles/scripts/fstrim-enable.sh

11 lines
233 B
Bash
Raw Permalink Normal View History

#! /usr/bin/bash
echo "Checking if FSTrim is enabled"
if sudo systemctl list-timers --no-pager | grep "fstrim"; then
echo "FStrim already enabled"
else
echo "Enabling FSTrim"
sudo systemctl enable fstrim.timer --now
fi