|
1 | 1 | PREFIX := /usr/local
|
2 |
| - |
| 2 | +SYSTEMD_HOME := /lib/systemd/system |
3 | 3 | all:
|
4 | 4 |
|
5 | 5 | install:
|
| 6 | + install -d $(DESTDIR)/etc/cron.d |
| 7 | + install -d $(DESTDIR)/etc/cron.daily |
| 8 | + install -d $(DESTDIR)/etc/cron.hourly |
| 9 | + install -d $(DESTDIR)/etc/cron.weekly |
| 10 | + install -d $(DESTDIR)/etc/cron.monthly |
| 11 | + install -m 0644 etc/zfs-auto-snapshot.cron.frequent $(DESTDIR)/etc/cron.d/zfs-auto-snapshot |
| 12 | + install etc/zfs-auto-snapshot.cron.hourly $(DESTDIR)/etc/cron.hourly/zfs-auto-snapshot |
| 13 | + install etc/zfs-auto-snapshot.cron.daily $(DESTDIR)/etc/cron.daily/zfs-auto-snapshot |
| 14 | + install etc/zfs-auto-snapshot.cron.weekly $(DESTDIR)/etc/cron.weekly/zfs-auto-snapshot |
| 15 | + install etc/zfs-auto-snapshot.cron.monthly $(DESTDIR)/etc/cron.monthly/zfs-auto-snapshot |
| 16 | + install -d $(DESTDIR)$(PREFIX)/share/man/man8 |
| 17 | + install src/zfs-auto-snapshot.8 $(DESTDIR)$(PREFIX)/share/man/man8/zfs-auto-snapshot.8 |
| 18 | + install -d $(DESTDIR)$(PREFIX)/sbin |
| 19 | + install src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot |
| 20 | + |
| 21 | +systemd: |
| 22 | + install -d $(DESTDIR)$(PREFIX)$(SYSTEMD_HOME) |
| 23 | + install timers/zfs-auto-snapshot-frequent.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-frequent.service |
| 24 | + install timers/zfs-auto-snapshot-frequent.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-frequent.timer |
| 25 | + install timers/zfs-auto-snapshot-hourly.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-hourly.service |
| 26 | + install timers/zfs-auto-snapshot-hourly.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-hourly.timer |
| 27 | + install timers/zfs-auto-snapshot-daily.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-daily.service |
| 28 | + install timers/zfs-auto-snapshot-daily.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-daily.timer |
| 29 | + install timers/zfs-auto-snapshot-weekly.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-weekly.service |
| 30 | + install timers/zfs-auto-snapshot-weekly.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-weekly.timer |
| 31 | + install timers/zfs-auto-snapshot-monthly.service $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-monthly.service |
| 32 | + install timers/zfs-auto-snapshot-monthly.timer $(DESTDIR)/$(SYSTEMD_HOME)/zfs-auto-snapshot-monthly.timer |
| 33 | + install timers/zfs-auto-snapshot.target $(DESTDIR)$(PREFIX)$(SYSTEMD_HOME)/zfs-auto-snapshot.target |
6 | 34 | install -d $(DESTDIR)$(PREFIX)/share/man/man8
|
7 | 35 | install src/zfs-auto-snapshot.8 $(DESTDIR)$(PREFIX)/share/man/man8/zfs-auto-snapshot.8
|
8 | 36 | install -d $(DESTDIR)$(PREFIX)/sbin
|
9 | 37 | install src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot
|
10 |
| - install -d $(DESTDIR)$(PREFIX)/lib/systemd/system |
11 |
| - install timers/zfs-auto-daily.service $(DESTDIR)$(PREFIX)/lib/systemd/system/zfs-auto-daily.service |
12 |
| - install timers/zfs-auto-daily.timer $(DESTDIR)$(PREFIX)/lib/systemd/system/zfs-auto-daily.timer |
13 |
| - install timers/zfs-auto-hourly.service $(DESTDIR)$(PREFIX)/lib/systemd/system/zfs-auto-hourly.service |
14 |
| - install timers/zfs-auto-hourly.timer $(DESTDIR)$(PREFIX)/lib/systemd/system/zfs-auto-hourly.timer |
15 |
| - install timers/zfs-auto-weekly.service $(DESTDIR)$(PREFIX)/lib/systemd/system/zfs-auto-weekly.service |
16 |
| - install timers/zfs-auto-weekly.timer $(DESTDIR)$(PREFIX)/lib/systemd/system/zfs-auto-weekly.timer |
17 |
| - install timers/zfs-auto.target $(DESTDIR)$(PREFIX)/lib/systemd/system/zfs-auto.target |
| 38 | + systemctl enable zfs-auto-snapshot.target |
| 39 | + systemctl daemon-reload |
| 40 | + systemctl start zfs-auto-snapshot.target |
0 commit comments