Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: Gert on May 27, 2007, 09:01:02 PM
-
Hi everyone.
I would like my servers to send me and email when it is restarted, shut down or switched on.
For "switched on" i did have added the following line to /etc/rc.local:
echo | mail -s "Server Online" me@domain.co.za
Seems to work fine. How can i achieve the same with shutting down and restarting?
-
There used to be an email address for administrative notices, in the control panel, I wonder what happened to it?
( My searches didn't find any SME7 data)
-
You mean admin@domain.co.za?? Its still there. But that does not answer my question.
-
/etc/e-smith/events/actions/
Have a look at the action scripts, see if you can modify those actions called on signal-event reboot and conf-statup. you would need to look at the manual for information -
http://mirror.contribs.org/smeserver/contribs/gordonr/devguide/html/c382.htm
http://wiki.contribs.org/SME_Server:Documentation:Technical_Manual:Chapter3
these pages are a good start! you will need to look at custom templating.
also you may be interested in sme7admin, which has a great server-manager panel and can email you with the status of the server at pre-determined intervals - you could make this every 1 hour, and then the absence of the email could give you an indication of server state.
just my 2c
-
Thank you for the reply.
I will play around with that. If the server is shutdown with the powerbutton I don't think that the reboot event will take place (i might be wrong) I am currently using sme7admin. very nice contrib.
-
what about /etc/rc0.d/ and /etc/rc6.d ??