Commit df30ce82 authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

logout

parent 27f81044
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
# ~/.bash_logout: executed by bash(1) when login shell exits.

# when leaving the console clear the screen to increase privacy
# Protect user's bash_logout code file from changes and views
chmod -c a-wx,og-r,u+r "$HOME/.bash_logout"

if [ "$SHLVL" = 1 ]; then
    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
# Source user's private bashrc code snippets if they exist
if [ -d "$HOME/.bash_logout.d" ]; then
  chmod -Rc og-rwx,u+rwX "$HOME/.bash_logout.d"
  for i in $HOME/.bash_logout.d/*.sh; do
    if [ -r "$i" ]; then
      . "$i"
    fi
  done
  unset i
fi
+5 −0
Original line number Diff line number Diff line
# when leaving the console clear the screen to increase privacy

if [ "$SHLVL" = 1 ]; then
    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi