initscript for sending email whenever server is started or shutdown.