I want to only send a mail before my system goes for a shutdown or reboot. I don't want a mail when it comes up after a reboot or is normally started.. How can i achieve this?
Then rename the real shutdown to shutdown.original, and name this script shutdown.
Of course if the mail queue is busy, the users might not receive the email before the system goes down, in which case they will not get the email until after the system is re-booted.
Whats the difference between mail and mailx?
I'm trying to troubleshoot a problem where I can send mail from server A with this `echo $MESSAGE | mail -s "$SUBJECT" -r $FROM $RECIPIENTS` command but executing the same command from server B throws me this error (Both servers are RHEL)
... (1 Reply)
I am having exactly the same problem with https://www.unix.com/programming/129264-application-cleanup-during-linux-shutdown.html but the thread is old and closed. The only difference is that I use sigaction() instead of signal(), which is recommended, as far as I know.
This is my code:
... (9 Replies)
Hi All,
I have one situation to shut-down the system through shell script.I need script command to shut-down the system and process should end(safe-mode) the MyEclipse. (0 Replies)
Hi guys...
I am busy writing a script to notify me via an mail if my application is down. I have done that.
Now I want this script to stop sending mails after five mails were sent but the script should keep on checking the application.
When the application is up again that count should be... (5 Replies)
Hello,
from last few days my laptop is not whutting down properly.. when ever i ty to shutdown it restarts again.. what may be problem?? antivirus is updated till date.. and i use windows xp sp2....
regards,
deepak. (5 Replies)
I am working on a SUN T2000 machine with Solaris 10 running on it. When I checked the system this morning, I found it to be turned off. The lastreboot command showed that the system had been shut down the previous night.
I want to find out how the system was shut down. I have run hardware health... (2 Replies)
Ok here is the problem we have 2 v440 with same IP address running solars 9. one remains on the other remains off. They are both configured exactly the same for redundant purposes for the software we use. This was the best/worst idea. Great because down time is only a mere minutes. The bad is the... (7 Replies)
Hi everyone!
I'm trying to create a database monitoring script that reads an alert file and sends an error message if it can 'grep' a particular string.
Is there a way to send this message to a mail client using SMTP?
Even better, is there any place on this site that has these kinds of... (5 Replies)