summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..29b9577
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
1control: control.sh depends.control .git/refs/heads/master
2 ./control.sh depends.control > $@
3
4DD_USER = dyndns
5DD_GROUP = dyndns
6
7install-dyndns-server:
8ifneq ($(shell id -u),0)
9 $(SUDO_MAKE) $@
10else
11 : apt install pdns
12 : adduser $(DD_USER)
13 chown root:$(DD_GROUP) /etc/powerdns
14 chown pdns:$(DD_GROUP) /etc/powerdns/powerdns.sqlite3
15 chmod g+rwx /etc/powerdns
16 chmod g+rw /etc/powerdns/powerdns.sqlite3
17 $(MAKE) ~$(DD_USER)/.ssh/authorized_keys
18 install src/samizdat-ssh-command /usr/local/bin/
19 install src/dyndns-command.sh ~$(DD_USER)/samizdat-default-command
20endif
21
22define dyndns_authorized_keys_contents
23command="/usr/local/bin/samizdat-ssh-command /etc/powerdns/dyndns-command.sh",no-port-forwarding * Samizdat - YES WE CAN
24endef
25
26~$(DD_USER)/.ssh/authorized_keys:
27 : writing file $@ $(file >$@,$(dyndns_authorized_keys_contents))