summaryrefslogtreecommitdiffstats
path: root/retiolum/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'retiolum/Makefile')
-rw-r--r--retiolum/Makefile32
1 files changed, 23 insertions, 9 deletions
diff --git a/retiolum/Makefile b/retiolum/Makefile
index 0d99ee70..cd0a543c 100644
--- a/retiolum/Makefile
+++ b/retiolum/Makefile
@@ -1,15 +1,29 @@
-.phony: update it all so install
+.PHONY: update all install hosts
-all: select-target
+EXES := update_tinc_hosts fillxx update-retiolum-hosts
-it: so
-so: it
+all: update links
-/etc/tinc/retiolum/hosts:
- cd $(dir $@) && git clone https://github.com/krebscode/hosts
+links:
+ for x in $(EXES); do ln -vsnf ../retiolum/bin/$$x ../bin; done
-update: /etc/tinc/retiolum/hosts
- cd $< && git pull
-install:
+install: upgrade
+ ../punani/bin/punani tinc python
scripts/tinc_setup/install.sh
+ cp scripts/tinc_setup/tinc-up /etc/tinc/retiolum/tinc-up
+ scripts/autostart/create-startup.sh
+
+upgrade: update
+ if ! diff -u scripts/tinc_setup/tinc-up /etc/tinc/retiolum/tinc-up; then \
+ sudo cp scripts/tinc_setup/tinc-up /etc/tinc/retiolum/tinc-up; \
+ sudo bin/restart-tincd; \
+ fi
+
+update: hosts
+ bin/update_tinc_hosts "create magic" || true
+ bin/update_tinc_hosts restart
+ sudo pkill -HUP tincd || :;
+
+hosts:
+ bin/update-retiolum-hosts || true