mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-15 04:43:01 -04:00
21 lines
618 B
Plaintext
Executable File
21 lines
618 B
Plaintext
Executable File
#!/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' "${CONFIG_FILE_PATH}"
|
|
sed -i '/^GatewayPorts/c\GatewayPorts clientspecified' "${CONFIG_FILE_PATH}"
|
|
echo "TcpForwarding is enabled"
|
|
|
|
if [ "$SHELL_NOLOGIN" == 'true' ]; then
|
|
USER_NAME=${USER_NAME:-linuxserver.io}
|
|
|
|
usermod --shell /sbin/nologin "$USER_NAME" &&
|
|
echo "Shell is set to /sbin/nologin for the user $USER_NAME"
|
|
fi
|