A Solaris SMF manifest often needs to be fine tuned: in this case, for example, you're relying on two dependencies that are not part of a Solaris 10 standard installation such as MySQL (from the manifest, I infer that you installed it from Blastwave or OpenCSW) and the service called "jira-unlock" that you don't specify further.

I blogged about it: in this post you'll find a SMF with a dependency with a Solaris-bundled PostgreSQL instance. The post might be useful if you wanted to understand the basics of SMF and writing a manifest of your own.

Anonymous

I felt like these were all missing something, namely a status method, a confident stop method, and a check to avoid duplicate processes on start. This script will also work for jira, confluence, bamboo, etc with minimal var modifications. Thanks to the others for ideas and script code, I think I've combined most of them. This script is running on Ubuntu 12.04. I see where it can be a little cleaner but it works for me so I'm moving on.

On Unix and Linux systems, it is best practice to set the shell for service accounts to an invalid shell such as /dev/null or /sbin/nologin. If you do that, you need to tweak the "su" command to include a valid shell. Like this:

/bin/su -s /bin/sh -m $USER -c "$BASE/bin/startup.sh &> /dev/null"

Also, if you're running SELinux, you might have to use /sbin/runuser instead of /bin/su. You can handle that like this

I have improved Daniel Harvey's script further, this one properly tracks JIRA's start up and only completes startup after the server is ready to serve requests. Shutdown is also cleaner (his script occasionally gave me JiraLockedErrors) because we are directly calling catalina.sh, upstart properly tracks the pid of the server.