mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-02 06:28:34 -04:00
Add the parameter SHELL_NOLOGIN
This commit is contained in:
@@ -4,3 +4,10 @@
|
||||
sed -i '/^AllowTcpForwarding/c\AllowTcpForwarding yes' /etc/ssh/sshd_config
|
||||
sed -i '/^GatewayPorts/c\GatewayPorts clientspecified' /etc/ssh/sshd_config
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user