I'm experimenting with running Sonar on my Linux desktop box. I wanted to make it start up automatically on startup of the box, but it's ok for it to run as me.
I created "~/.init/sonar.conf" with the following simple contents:
description "Sonar server"
start on startup
respawn
chdir ~/apps/sonar-3.2/bin
exec ~/apps/sonar-3.2/bin/linux-x86-64/sonar.sh start
I read that Upstart isn't configured for user jobs by default, so I edited "/etc/dbus-1/system.d/Upstart.conf", commenting out the existing "" element and replacing it with the following:
<policy context="default">
<allow send_destination="com.ubuntu.Upstart" send_interface="org.freedesktop.DBus.Introspectable"/>
<allow send_destination="com.ubuntu.Upstart" send_interface="org.freedesktop.DBus.Properties"/>
<allow send_destination="com.ubuntu.Upstart" send_interface="com.ubuntu.Upstart0_6"/>
<allow send_destination="com.ubuntu.Upstart" send_interface="com.ubuntu.Upstart0_6.Job"/>
<allow send_destination="com.ubuntu.Upstart" send_interface="com.ubuntu.Upstart0_6.Instance"/>
</policy>
When I do "start sonar" I get "start: Job failed to start". I also did "initctl list | grep sonar" and got "sonar stop/waiting".
How can I troubleshoot this further?