summaryrefslogtreecommitdiffstats
path: root/retiolum/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'retiolum/Makefile')
-rwxr-xr-xretiolum/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/retiolum/Makefile b/retiolum/Makefile
new file mode 100755
index 00000000..b3a3c124
--- /dev/null
+++ b/retiolum/Makefile
@@ -0,0 +1,32 @@
+.PHONY: update all install hosts
+
+EXES := update_tinc_hosts fillxx update-retiolum-hosts
+
+all: update links
+
+links:
+ for x in $(EXES); do ln -snf ../retiolum/bin/$$x ../bin; done
+
+
+install: upgrade
+ ../punani/bin/punani install tinc python
+ scripts/tinc_setup/install.sh
+ sudo cp scripts/tinc_setup/tinc-up /etc/tinc/retiolum/tinc-up
+
+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" || :;
+ bin/update_tinc_hosts restart
+ sudo pkill -HUP tincd || :;
+
+startup:
+ scripts/autostart/create-startup.sh
+
+hosts:
+ bin/update-retiolum-hosts || :;
+ sudo bin/patch-retiolum-hosts