- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shutdown Notification
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
06-15-2004 01:34 AM
06-15-2004 01:34 AM
I am wondering if there is a script i can run or a file that can be edited to mail me when a server has been issued a shutdown command?
Regards,
Aidan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 01:39 AM
06-15-2004 01:39 AM
Re: Shutdown Notification
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 01:41 AM
06-15-2004 01:41 AM
Re: Shutdown Notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 01:46 AM
06-15-2004 01:46 AM
Re: Shutdown Notification
Could you tell me what needs to be in the script? Also if i have a K090notifyme in rc2.d do i need an S910notify me in rc3.d?
Appoplogies if this is asking too much but I am not a sys admin, just a hardware engineer trying to keep track of expensive test equipment!
Thanks,
Aidan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 01:54 AM
06-15-2004 01:54 AM
Re: Shutdown Notification
/usr/bin/mailx -s "system xxxx has been shutdown" aidan@foo.com
S910
/usr/bin/mailx -s "system xxxx has been started" aidan@foo.com
regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 01:57 AM
06-15-2004 01:57 AM
Re: Shutdown Notification
echo `hostname` is rebooting |mailx -s "reboot msg" yourname@company.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 02:02 AM
06-15-2004 02:02 AM
Solution#!/sbin/sh
#
unset UNIX95
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
NOTIFYLIST="YOUR_EMAILNAME@YOURDOMAIN.com"
case $1 in
start_msg)
echo "Send an email to notifyme that system is being broght backup"
;;
stop_msg)
echo "Send an email to notifyme that system is being shutdown"
;;
start)
echo "System (`hostname`) coming back up"|mailx -s"System `hostname` booting" ${NOTIFYLIST}
;;
stop)
echo "System (`hostname`) going down"|mailx -s"System `hostname` shutting down" ${NOTIFYLIST}
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
exit
Change permissions to execute:
chmod 555 /sbin/init.d/notifyme
Then create TWO symbolic links:
ln -s /sbin/init.d/notifyme /sbin/rc2.d/K090notifyme
ln -s /sbin/init.d/notifyme /sbin/rc2.d/S090notifyme
Then have at it
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 02:28 AM
06-15-2004 02:28 AM
Re: Shutdown Notification
root : you@yourdomain.com
then newaliases, and restart sendmail.
You will get email on boot like this:
Subject: Server booted at Fri Jun 11 09:42:57 MDT 2004
Rgds...Geoff