mirror of
https://github.com/Retropex/btcpayserver-docker.git
synced 2025-05-12 21:10:42 +02:00
Make sshd config change handle tab as well
This commit is contained in:
parent
b00c0a9800
commit
6c5ce5ab4a
@ -84,10 +84,10 @@ fi
|
||||
sshd_config="/etc/ssh/sshd_config"
|
||||
if [[ "$BTCPAY_ENABLE_SSH" == "true" ]] && \
|
||||
[[ -f "$sshd_config" ]] && \
|
||||
grep -Fxq "PermitRootLogin no" "$sshd_config"; then
|
||||
grep -q "PermitRootLogin[[:space:]]no" "$sshd_config"; then
|
||||
echo "Updating "$sshd_config" (Change from 'PermitRootLogin no' to 'PermitRootLogin prohibit-password')"
|
||||
echo "BTCPay Server needs connection from inside the container to the host in order to run btcpay-update.sh"
|
||||
sed -i 's/PermitRootLogin no/PermitRootLogin prohibit-password/' "$sshd_config"
|
||||
sed -i 's/PermitRootLogin[[:space:]]no/PermitRootLogin prohibit-password/' "$sshd_config"
|
||||
service sshd reload
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user