kdave / btrfsmaintenance

Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag on selected mountpoints or directories.
GNU General Public License v2.0
900 stars 79 forks source link

dist-install.sh > TimerUnits #58

Closed SManAT closed 5 years ago

SManAT commented 6 years ago

Hi! First: tx for the good work. Second: Implement in dist-install.sh the Log Message, somthing like: "Now copy the Service.Units and Timer.Units to /etc/systemd/system and do a btrfsmaintenance-refresh-cron.sh timer"

kdave commented 5 years ago

Thanks for the suggestion, the following text has been committed. The script installs only the cron scripts as the path is known, I'm not sure about the timer units so there's just the message and the decision is left to the distro packagers.

Installation path: 
For cron-based setups:
- edit cron periods and mount points in /btrfsmaintenance
- run ./btrfsmaintenance-refresh-cron.sh to update cron symlinks

For systemd.timer-based setups:
- copy *.timer files to the systemd.unit path (eg. /usr/lib/systemd/system/ or /etc/systemd/system)
- run './btrfsmaintenance-refresh-cron.sh timer' to enable and schedule the timers