summaryrefslogtreecommitdiff
path: root/OpenSSH_Anonymous_Access/Makefile
blob: d93c271a992425675ceded941edd876145968e82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)"