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)"