- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How can I excute a shell script when logout ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 06:39 PM
05-29-2003 06:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 06:41 PM
05-29-2003 06:41 PM
Re: How can I excute a shell script when logout ?
You can schedule in cron or use the at command.
man crontab
man at
Regards,
DR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 06:42 PM
05-29-2003 06:42 PM
Re: How can I excute a shell script when logout ?
You can use the at command or add a cron entry.
Regards,
DR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 06:50 PM
05-29-2003 06:50 PM
Re: How can I excute a shell script when logout ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:04 PM
05-29-2003 07:04 PM
Re: How can I excute a shell script when logout ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:23 PM
05-29-2003 07:23 PM
Re: How can I excute a shell script when logout ?
In csh you can configure the .logout file. From there you can call the requisite shell script or you can configure that ".logout" file itself as a shell script.
Alternatively,
Inside your .profile you can call another script, which would wait for the exit of your shell. Once it gets the exit code, it would execute a certain commands. This would be helpful to track root-logins and root-logouts, by sending out an e-mail saying root was logged in at XX:YY Hrs and logged out at ZZ:WW Hrs.
Regards..
Suhas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 01:37 AM
05-30-2003 01:37 AM
Solutiontrap "your_script" 0
(last character is zero)
eg
>trap "banner LOGOUT" 0
>exit
# ####### ##### ####### # # #######
# # # # # # # # # #
# # # # # # # # #
# # # # #### # # # # #
# # # # # # # # # #
# # # # # # # # # #
####### ####### ##### ####### ##### #
Connection closed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 04:34 AM
05-30-2003 04:34 AM