[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Logon/off scripts
On Thu, 23 Dec 2004, Ray Holtz wrote:
> I'm wondering where I would put a simple bash script so that it runs
> when I log a user on, then off.
.bash_login for login stuff.
.bash_logout for logout stuff.
From the bash manpage:
When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option, it first reads and executes
commands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one
that exists and is readable.
[snip]
When a login shell exits, bash reads and executes commands from the file
~/.bash_logout, if it exists.
--
Richard H. Fifarek
rfifarek@fifarek.net
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.