Check if coldfusion service running and send email

Posted on 2012-08-11
Last Modified: 2012-08-17
I'm having problems with an ubuntu 10.04 server running plesk 10.4.4 and coldfusion 8. Periodically the coldfusion service stops and plesk loses its path settings to CF. I need a script to run as a cron job every hour or so to check the service and email me if it isn't running.

Question by:msibley
    LVL 18

    Accepted Solution


    Install package "mailutils" if you don't already have "mail" on your system. When you install it, you have to configure it to work on your system.

    if pidof -x insertservicename > /dev/null; then
          echo "Service running"
          echo "Service stopped" | /usr/bin/mail -s "ALERT" ""

    Open in new window


    Regards, Tobias

    Author Comment

    That pretty much did the trick.



    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now