summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2023-05-22 15:45:24 -0400
committerAndrew Cady <d@jerkface.net>2023-05-22 15:45:24 -0400
commit1e91b2fac8135a37509d9e8129494a639674e7c6 (patch)
tree077aceca8ee08d1597e22de5782a3fdec3887a92 /Makefile
parent684c592ac659de0d934f5c9a47d28348d12e723e (diff)
poll with timer just to instantiate timers, ugh!
This makes everything work through systemd though. The user can simply drop config files into /etc/btrfs-backup/remotes/<name>.json and timers will automatically be created to handle syncing.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ac0ab02..0dd9c7e 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,14 @@ ifeq ($(remotes),)
5$(error You must put at least one *.json configuration file into <file:///$(config_dir)>). 5$(error You must put at least one *.json configuration file into <file:///$(config_dir)>).
6endif 6endif
7 7
8unit_files = push-btrfs.path push-btrfs.service push-btrfs.timer push-btrfs@.service push-btrfs@.timer
9
10enable_unit = push-btrfs.timer
11
8install: 12install:
9 for remote in $(remotes); do systemctl enable push-btrfs@$$remote.service; systemctl enable --now push-btrfs@$$remote.timer; done 13 systemctl link $(addprefix ./, $(unit_files))
14 systemctl reset-failed $(enable_unit)
15 systemctl enable --now $(enable_unit)
10 16
11go: 17go:
12 for remote in $(remotes); do bash$(if $(verbose), -x) push-btrfs $$remote$(if $(verbose),;, &) done; wait 18 for remote in $(remotes); do bash$(if $(verbose), -x) push-btrfs $$remote$(if $(verbose),;, &) done; wait