summaryrefslogtreecommitdiffstats
path: root/retiolum/Makefile
blob: e58e2ece66ebcdaa74a100adf9f3f98d105926fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
RETIOLUM_HOSTS = /etc/tinc/retiolum/hosts

.PHONY: update it all so install

all: update links 

links: 
	ln -sf $$PWD/bin/update_tinc_hosts ../bin/update_tinc_hosts
	ln -sf $$PWD/bin/fillxx ../bin/fillxx

it: so
so: it

hosts/:
	@echo "Writing new copy of hosts"
	[ -e $(RETIOLUM_HOSTS) ] || mkdir -p $(RETIOLUM_HOSTS)
	cp -r hosts/* $(RETIOLUM_HOSTS)/


install: update
	@# will not run automatically
	scripts/tinc_setup/install.sh

update: hosts/
	@echo creating Magic
	bin/update_tinc_hosts "create magic" || true
	@echo adding hosts
	bin/update_tinc_hosts restart

arch-install: update install arch-autostart autohosts

arch-autostart:
	make -C scripts/autostart arch