]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Close console after 10 minutes idle.
authorDaniel Weismüller <daniel.weismueller@ipfire.org>
Tue, 5 Feb 2013 20:35:16 +0000 (21:35 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 5 Feb 2013 20:35:16 +0000 (21:35 +0100)
For security reasons, all local consoles get closed
after 10 min idle. This does not count for screen or ssh sessions.

config/bash/dot_bashrc

index 6e6d1e1f17fedc3ab4f161dedb12a97b16c7c9e6..90b96b43261849239fbb0ec3b92d02d62493b7e0 100644 (file)
@@ -10,3 +10,9 @@ alias mv='mv -i'
 if [ -f /etc/bashrc ]; then
        . /etc/bashrc
 fi
+
+# Automatically logout only console users after 10 minutes.
+export TMOUT=0
+if [ -z "${SSH_TTY}" ] && [ -z "${STY}" ]; then
+       export TMOUT=600
+fi