.bash_logout does not get executed
Hi,
I am using redhat 7.3. I want to run a script when i logout, to clean up some of the files, processes, etc. I realized that the .bash_logout file does not get executed at logout. Does anyone know how i can make it to execute each time i logout? I tried adding trap in the .bash_profile file (trap "/path/scrip" 0) but that didn't seem to work. I would really appreciate it if someone could help me. Thank you!:confused: |
I realized that the .bash_logout file does not get executed at logout. Does anyone know how i can make it to execute each time i logout?
Are you sure it *doesn't* get executed and it's not due to a fault in your logout script? Adding a last line "echo "logout; sleep 2s" to your ~/.bash_logout should show if it really doesn't. ~/.bash_profile will only be executed on login by a login Bash or Sh shell. |
.bash_logout does not get executed. Also I can run my script manually without problem..any ideas?
|
does it get executed when you do not use graphical login? I/e/ go to runlevel 3, and then login from there and see if logging out executes the script. Maybe the logging out inside X doesn't get treated as logging out.
|
All times are GMT -5. The time now is 05:25 PM. |