Results 1 to 4 of 4
Hi there,
I just created a utility program using Java. This utility program notifies me via email when a significant event has occurred with a message something like:
Server has ...
- 07-01-2006 #1Just Joined!
- Join Date
- Jun 2006
- Posts
- 7
where is shutdown script
Hi there,
I just created a utility program using Java. This utility program notifies me via email when a significant event has occurred with a message something like:
I call the program MailAlert. It allows you to define up to six messages and can be called simply with a command like: alert message1Server has started. Systems operational.
Date: Sat Jul 01 10:03:40 ADT 2006
alert is a shell script that you put in the /etc/rc.d/init.d directory and it points to a shell script that exists in the directory where I put the MailAlert program: /usr/local/alert/alert.sh
So, if I want to be alerted when the server has just finished booting, in the /etc/profile script I add this command: alert message1
Now, what I would like to know is, what is an appropriate script to use for when the server is about to shut down? In that script I would enter the command: alert message2
message2 says: "Server is shutting down"
please advise,
Alan
- 07-01-2006 #2Linux User
- Join Date
- Jun 2006
- Posts
- 311
Hi ashiers,
You can use /etc/rc.d/rc6.d/S01reboot for doing that.Now, what I would like to know is, what is an appropriate script to use for when the server is about to shut down?
With Regards,
Thinker
- 07-01-2006 #3Just Joined!
- Join Date
- Jun 2006
- Posts
- 7
Ok, I tried that and from the comments at the top of the script it looks like the appropriate place to put the command: alert message2
Originally Posted by Thinker
Problem is, when I shut down the server the screen says:
alert command not found
Why would that be? How do I fix it?
Alan
- 07-01-2006 #4Linux User
- Join Date
- Jun 2006
- Posts
- 311
Hi ashiers,
Put the executable file, alert, in /usr/bin or in S01reboot point to the script alert.sh properly.
With Regards,
Thinker


Reply With Quote