mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-30 03:53:18 -04:00
update config path, make backwards compatible
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# set config path
|
||||
if [[ -f /config/sshd/sshd_config ]]; then
|
||||
CONFIG_FILE_PATH="/config/sshd/sshd_config"
|
||||
else
|
||||
CONFIG_FILE_PATH="/etc/ssh/sshd_config"
|
||||
fi
|
||||
|
||||
# allow tcp forwarding within openssh settings
|
||||
sed -i '/^AllowTcpForwarding/c\AllowTcpForwarding yes' /etc/ssh/sshd_config
|
||||
sed -i '/^GatewayPorts/c\GatewayPorts clientspecified' /etc/ssh/sshd_config
|
||||
sed -i '/^AllowTcpForwarding/c\AllowTcpForwarding yes' "${CONFIG_FILE_PATH}"
|
||||
sed -i '/^GatewayPorts/c\GatewayPorts clientspecified' "${CONFIG_FILE_PATH}"
|
||||
echo "TcpForwarding is enabled"
|
||||
|
||||
if [ "$SHELL_NOLOGIN" == 'true' ]; then
|
||||
|
||||
Reference in New Issue
Block a user