summaryrefslogtreecommitdiff
path: root/Makefile
blob: ac0ab02a0355451ea240116b13a869d2962bf218 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
config_dir = /etc/btrfs-backup/remotes
remotes = $(notdir $(wildcard $(config_dir)/*.json))

ifeq ($(remotes),)
$(error You must put at least one *.json configuration file into <file:///$(config_dir)>).
endif

install:
	for remote in $(remotes); do systemctl enable push-btrfs@$$remote.service; systemctl enable --now push-btrfs@$$remote.timer; done

go:
	for remote in $(remotes); do bash$(if $(verbose), -x) push-btrfs $$remote$(if $(verbose),;, &) done; wait