I am attempting to execute a script, ./startrf.sh from the user's .profile.
What I need is to have the session execute and logout regardless of exit status. I have attempted to put this statement:
trap 'logout' 0 1 2 3 15
in both the .profile and ./startrf.sh
In either case this only works if the script exits cleanly. If they hit ^C then it jumps out of script and .profile without executing the trap and brings them to a command line.
I need this session to close.
Any ideas on how to make this happen?
Thanks in advance.
What I need is to have the session execute and logout regardless of exit status. I have attempted to put this statement:
trap 'logout' 0 1 2 3 15
in both the .profile and ./startrf.sh
In either case this only works if the script exits cleanly. If they hit ^C then it jumps out of script and .profile without executing the trap and brings them to a command line.
I need this session to close.
Any ideas on how to make this happen?
Thanks in advance.