Hi all,

I just bought AssetUPnP linux, and am attempting to get it running under Ubuntu server. I can get the server to work perfectly just running from the command line, but would like to basically get it running as a service.

Your installation advice (adding the call to rc.d) would basically end up with the server running as root, which given its webserver nature (see later request) I am somewhat unkeen on. I started attempting to get the server to run as an upstart job under Ubuntu. So far I have made reasonable progress, but it would seem that the server itself does NOT like to run in the upstart environment, possibly due to its fondness of outputting to stdout, which is a bit of a no-no as far as linux daemons go. The app starts, then immediately exits with error 255 - could you clarify what this error means?

I am tempted to go old school and attempt to get it running using an init.d script, but I'm not entirely sure this will give much better results until I understand the above error. For what its worth, my upstart script is as follows:

Code:
description "Asset UPnP server"

start on (local-filesystems and net-device-up IFACE!=lo)
stop on stopping network-services

respawn
respawn limit 10 5

setuid music

exec /usr/bin/asset/AssetUPnP
which when run, results in the following in syslog:

Code:
Sep 24 11:09:20 clanger kernel: [2917171.788955] init: asset-upnp main process (29653) terminated with status 255
As a debug thing ubuntu suggest running the app along the following lines to test how the app will react to being run in an upstart environment :

Code:
user=music
cmd=/usr/bin/asset/AssetUPnP
su -c 'nohup env -i $cmd </dev/null >/dev/null 2>&1 &' $user
Which also fails, hence my suspicion about the problems using stdout (although piping output to a logfile also similarly fails)

Appart from support on this, I have a couple of future requests:

It would really simplify matters if you gave a command line switch to daemonize, either single fork or double fork, however if this is not possible, I would strongly recommend replacing the stdout output with a logfile (again, ideally configurable as to location)

It would also really be handy to be able to specify which IP address (interface) to bind to - my server is dual homed, with one interface peeking onto the greater internet, and as of the minute I am basically having to firewall it off. This could also cause issues I would imagine should the server not be able to bind its port on one of the interfaces for whatever reason.

Thanks in advance,

P.