From 099d70f87208afc6bc0baf098c266c0d705f2453 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Tue, 26 Oct 2021 09:29:50 -0400 Subject: split OpenSSH_Anonymous_Access from EndoForge EndoForge now installs OpenSSH_Anonymous_Access as a dependency. --- OpenSSH_Anonymous_Access/Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 OpenSSH_Anonymous_Access/Makefile (limited to 'OpenSSH_Anonymous_Access/Makefile') diff --git a/OpenSSH_Anonymous_Access/Makefile b/OpenSSH_Anonymous_Access/Makefile new file mode 100644 index 0000000..d93c271 --- /dev/null +++ b/OpenSSH_Anonymous_Access/Makefile @@ -0,0 +1,23 @@ +SRC = . + +SELF_NAME = OpenSSH_Anonymous_Access + +SSHD_CONFIG_DIR = /etc/ssh/sshd_config.d +SSH_LIBEXEC_DIR = /usr/lib/ssh + +.PHONY: install install-files install-link + +install: install-files install-link + systemctl reload sshd + +install-files: + install -d "$(SSHD_CONFIG_DIR)" "$(SSH_LIBEXEC_DIR)" + + install -m0644 -t "$(SSHD_CONFIG_DIR)" "$(SRC)/anonymous-access.conf" + install -t "$(SSH_LIBEXEC_DIR)" "$(SRC)/$(SELF_NAME)" + +# The location of this link is hard-coded here and in the +# OpenSSH_Anonymous_Access script. +install-link: + [ -e /etc/ssh/AuthorizedKeysCommand ] || ln -s -t /etc/ssh "$(SSH_LIBEXEC_DIR)/$(SELF_NAME)" + -- cgit v1.2.3