fix: only uncomment port for sshd-config

This commit is contained in:
Jose Diaz-Gonzalez
2019-04-08 13:42:01 -04:00
parent 6cc6d5a33f
commit beef464cc1

View File

@@ -69,11 +69,11 @@ else ifeq ($(shell grep dokku.me /root/.ssh/config),)
endif
ifneq ($(wildcard /etc/ssh/sshd_config),)
sed --in-place "s/^#Port 22$\/Port 22/g" /etc/ssh/sshd_config
ifeq ($(shell grep 22333 /etc/ssh/sshd_config),)
sed --in-place "s:^Port 22:Port 22 \\nPort 22333:g" /etc/ssh/sshd_config
sed --in-place "s:^#Port 22$:Port 22 \\nPort 22333:g" /etc/ssh/sshd_config
service ssh restart
endif
service ssh restart
endif
@echo "-----> Installing SSH public key..."