Run devmon using upstart script

$ cat /etc/init/devmon.conf
description “DEVMON Hobbit SNMP tool upstart script”
author “Asif Iqbal”

start on runlevel [23]
stop on runlevel [!23]

exec su devmon -c “/usr/local/devmon/devmon -f”

 

Advertisements

About asif

Solaris sysadmin
This entry was posted in solaris and tagged . Bookmark the permalink.

One Response to Run devmon using upstart script

  1. Hi.

    Very useful first step here, but I found I had to expand on your script slightly by adding a post-stop script section after your script. My addition is included below:

    start on runlevel [23]
    stop on shutdown

    exec su xymon -c “/usr/lib/devmon/devmon -f”

    post-stop script
    ps -ax | grep devm | awk ‘{print $1}’ | xargs kill
    rm -f /var/run/devmon/devmon.pid
    end script

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s