diff options
-rw-r--r-- | EndoForge/Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/EndoForge/Makefile b/EndoForge/Makefile index 0f662d6..6739edd 100644 --- a/EndoForge/Makefile +++ b/EndoForge/Makefile | |||
@@ -25,7 +25,7 @@ USER_SSH_CONFIG_DIR = ~$(USER)/.ssh | |||
25 | 25 | ||
26 | BROWSER != 2>/dev/null which xdg-open || which w3m || which links || which elinks | 26 | BROWSER != 2>/dev/null which xdg-open || which w3m || which links || which elinks |
27 | 27 | ||
28 | .PHONY: install install-user install-root shared doc test | 28 | .PHONY: install install-user install-user-config install-root shared doc test |
29 | 29 | ||
30 | doc: README.html | 30 | doc: README.html |
31 | $(BROWSER) $< | 31 | $(BROWSER) $< |
@@ -46,11 +46,17 @@ sed \ | |||
46 | -e 's?PidFile=$$?&$(HOME)/.ssh/sshd.pid?' | 46 | -e 's?PidFile=$$?&$(HOME)/.ssh/sshd.pid?' |
47 | endef | 47 | endef |
48 | 48 | ||
49 | install: $(if $(HAVE_ROOT), install-root, install-user) | 49 | install: $(if $(HAVE_ROOT), install-root, install-user) |
50 | 50 | ||
51 | install-user: | 51 | install-user-config: |
52 | $(INSTALL) -d ~/.ssh | 52 | $(INSTALL) -d ~/.ssh |
53 | $(INSTALL) -t ~/.ssh $(SRC)/AnonymousAccessCommand | 53 | $(INSTALL) -t ~/.ssh $(SRC)/AnonymousAccessCommand |
54 | |||
55 | |||
56 | ~/.ssh/id_ed25519: | ||
57 | ssh-keygen -t ed25519 -P '' -f $@ | ||
58 | |||
59 | install-user: install-user-config ~/.ssh/id_ed25519 | ||
54 | $(EDIT_SSHD) < $(SRC)/sshd_config > ~/.ssh/sshd_config.tmp | 60 | $(EDIT_SSHD) < $(SRC)/sshd_config > ~/.ssh/sshd_config.tmp |
55 | $(MV) ~/.ssh/sshd_config.tmp ~/.ssh/sshd_config | 61 | $(MV) ~/.ssh/sshd_config.tmp ~/.ssh/sshd_config |
56 | $(INSTALL) -m0644 -t ~/.config/systemd/user $(SRC)/sshd.service | 62 | $(INSTALL) -m0644 -t ~/.config/systemd/user $(SRC)/sshd.service |
@@ -58,7 +64,7 @@ install-user: | |||
58 | systemctl --user enable sshd | 64 | systemctl --user enable sshd |
59 | systemctl --user restart sshd | 65 | systemctl --user restart sshd |
60 | 66 | ||
61 | install-root: | 67 | install-root: install-user-config |
62 | $(ROOT_INSTALL) -d "$(SSH_CONFIG_DIR)" "$(SSHD_CONFIG_DIR)" "$(SSH_LIB_DIR)" || true | 68 | $(ROOT_INSTALL) -d "$(SSH_CONFIG_DIR)" "$(SSHD_CONFIG_DIR)" "$(SSH_LIB_DIR)" || true |
63 | $(ROOT_INSTALL) -m0644 -t "$(SSHD_CONFIG_DIR)" $(SRC)/anonymous-access.conf || true | 69 | $(ROOT_INSTALL) -m0644 -t "$(SSHD_CONFIG_DIR)" $(SRC)/anonymous-access.conf || true |
64 | $(ROOT_INSTALL) -t "$(SSH_LIB_DIR)" $(SRC)/AuthorizedKeysCommand || true | 70 | $(ROOT_INSTALL) -t "$(SSH_LIB_DIR)" $(SRC)/AuthorizedKeysCommand || true |