summaryrefslogtreecommitdiffstats
path: root/retiolum/Makefile
diff options
context:
space:
mode:
authortv <tv@also>2011-11-10 01:19:04 +0100
committertv <tv@also>2011-11-10 01:19:04 +0100
commit8ddd371557d626f6586282c3345e3a2a8f7ee487 (patch)
tree99f4574fec61ab0211078d63da0dfd9014850fc3 /retiolum/Makefile
parent30ec5d0a41d162ebe89a5cff44e12f3153d21fe0 (diff)
//retiolum update: cp tinc-up and restart tincd
This commit updates /etc's tinc-up if it has changed and then restarts tincd. If tinc-up hasn't changed then only HUP and ALRM are sent to the retiolum tincd process.
Diffstat (limited to 'retiolum/Makefile')
-rw-r--r--retiolum/Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/retiolum/Makefile b/retiolum/Makefile
index a7fa500a..7528ddd2 100644
--- a/retiolum/Makefile
+++ b/retiolum/Makefile
@@ -12,18 +12,20 @@ hosts:
install: update
../punani/bin/punani -Eih tinc /usr/bin/python /usr/bin/python2
- @# will not run automatically
scripts/tinc_setup/install.sh
+ cp scripts/tinc_setup/tinc-up /etc/tinc/retiolum/tinc-up
scripts/autostart/create-startup.sh
update: hosts
- @echo creating Magic
bin/update_tinc_hosts "create magic" || true
- @echo adding hosts
bin/update_tinc_hosts restart
- @echo reloading tincd
- sudo pkill -HUP tincd || true
- sudo pkill -ALRM tincd || true
+ if ! diff 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; \
+ else \
+ sudo pkill -HUP tincd || :; \
+ sudo pkill -ALRM tincd || :; \
+ fi
arch-install: update install arch-autostart autohosts