-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto snapshot timers are statically configured
- Loading branch information
Showing
11 changed files
with
22 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,27 @@ | ||
PREFIX := /usr/local | ||
SYSTEMD_HOME := /lib/systemd/system | ||
SYSTEMD_HOME := $(PREFIX)/lib/systemd/system | ||
|
||
all: | ||
.PHONY: all | ||
|
||
install: | ||
install -d $(DESTDIR)/etc/cron.d | ||
install -d $(DESTDIR)/etc/cron.daily | ||
install -d $(DESTDIR)/etc/cron.hourly | ||
install -d $(DESTDIR)/etc/cron.weekly | ||
install -d $(DESTDIR)/etc/cron.monthly | ||
install -m 0644 etc/zfs-auto-snapshot.cron.frequent $(DESTDIR)/etc/cron.d/zfs-auto-snapshot | ||
install etc/zfs-auto-snapshot.cron.hourly $(DESTDIR)/etc/cron.hourly/zfs-auto-snapshot | ||
install etc/zfs-auto-snapshot.cron.daily $(DESTDIR)/etc/cron.daily/zfs-auto-snapshot | ||
install etc/zfs-auto-snapshot.cron.weekly $(DESTDIR)/etc/cron.weekly/zfs-auto-snapshot | ||
install etc/zfs-auto-snapshot.cron.monthly $(DESTDIR)/etc/cron.monthly/zfs-auto-snapshot | ||
install -d $(DESTDIR)$(PREFIX)/share/man/man8 | ||
install src/zfs-auto-snapshot.8 $(DESTDIR)$(PREFIX)/share/man/man8/zfs-auto-snapshot.8 | ||
install -d $(DESTDIR)$(PREFIX)/sbin | ||
install src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot | ||
install -d $(DESTDIR)$(PREFIX)/sbin $(DESTDIR)$(PREFIX)/share/man/man8 | ||
install -m 0755 src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot | ||
install -m 0422 -t $(DESTDIR)$(PREFIX)/share/man/man8 src/zfs-auto-snapshot.8 | ||
install -m 0422 -t $(DESTDIR)$(SYSTEMD_HOME) \ | ||
timers/zfs-auto-snapshot-daily.service \ | ||
timers/zfs-auto-snapshot-daily.timer \ | ||
timers/zfs-auto-snapshot-frequent.service \ | ||
timers/zfs-auto-snapshot-frequent.timer \ | ||
timers/zfs-auto-snapshot-hourly.service \ | ||
timers/zfs-auto-snapshot-hourly.timer \ | ||
timers/zfs-auto-snapshot-monthly.service \ | ||
timers/zfs-auto-snapshot-monthly.timer \ | ||
timers/zfs-auto-snapshot-weekly.service \ | ||
timers/zfs-auto-snapshot-weekly.timer \ | ||
timers/zfs-auto-snapshot.target | ||
.PHONY: install | ||
|
||
systemd: | ||
install -d $(DESTDIR)$(PREFIX)$(SYSTEMD_HOME) | ||
install timers/zfs-auto-snapshot-frequent.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-frequent.service | ||
install timers/zfs-auto-snapshot-frequent.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-frequent.timer | ||
install timers/zfs-auto-snapshot-hourly.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-hourly.service | ||
install timers/zfs-auto-snapshot-hourly.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-hourly.timer | ||
install timers/zfs-auto-snapshot-daily.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-daily.service | ||
install timers/zfs-auto-snapshot-daily.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-daily.timer | ||
install timers/zfs-auto-snapshot-weekly.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-weekly.service | ||
install timers/zfs-auto-snapshot-weekly.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-weekly.timer | ||
install timers/zfs-auto-snapshot-monthly.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-monthly.service | ||
install timers/zfs-auto-snapshot-monthly.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-monthly.timer | ||
install timers/zfs-auto-snapshot.target $(DESTDIR)$(PREFIX)$(SYSTEMD_HOME)/zfs-auto-snapshot.target | ||
install -d $(DESTDIR)$(PREFIX)/share/man/man8 | ||
install src/zfs-auto-snapshot.8 $(DESTDIR)$(PREFIX)/share/man/man8/zfs-auto-snapshot.8 | ||
install -d $(DESTDIR)$(PREFIX)/sbin | ||
install src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot | ||
systemctl enable zfs-auto-snapshot.target | ||
systemctl daemon-reload | ||
systemctl start zfs-auto-snapshot.target | ||
enable: | ||
systemctl enable --now zfs-auto-snapshot.target | ||
.PHONY: enable |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters