I wish to use this .bash_logout
script to check some things before the user log out and possibly deny to log out if things to do remains.
My use case is to check if a git
repo is clean before allowing the user to log out.
I wish to use this .bash_logout
script to check some things before the user log out and possibly deny to log out if things to do remains.
My use case is to check if a git
repo is clean before allowing the user to log out.
From
man bash
:The current login shell is on its way out when
~/.bash_logout
runs. But it doesn't prevent you from starting another login shell, which will give the illusion that logout was prevented: