running with upstart job

Skip to first unread message

pablo

unread,
Nov 20, 2009, 8:47:56 AM11/20/09
to MochiWeb
Hi,

I'm trying to start a mochiweb app(called myweb) on ubuntu with an
upstart job.
I've created a myweb.conf file under /etc/init with the following:

start on filesystem and net-device-up
stop on runlevel [06]

script
MYWEBPATH=/home/user/myweb
exec erl -noinput -pa $MYWEBPATH/ebin $MYWEBPATH/deps/*/ebin -boot
start_sasl -s myweb
end script

When I'm trying to start the job and check its status I'm getting:
$sudo start myweb
myweb start/running, process 6682
$sudo status myweb
myweb stop/waiting

So my mochiweb app doesn't run.
When I'm using the start.sh script generated with the skeleton my app
run fine.

Am I missing a flag in the erl command or is it something else?

Thanks

Steve Davis

unread,
Nov 20, 2009, 6:58:04 PM11/20/09
to MochiWeb
you probably should add a -detached flag in there.

/s

Bob Ippolito

unread,
Nov 20, 2009, 7:01:01 PM11/20/09
to moch...@googlegroups.com
I'm not familiar with upstart but the software we use (daemontools)
works best when the process stays attached. It basically acts like
heartbeat but also deals with the stdout/stderr logging.
> --
>
> You received this message because you are subscribed to the Google Groups "MochiWeb" group.
> To post to this group, send email to moch...@googlegroups.com.
> To unsubscribe from this group, send email to mochiweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mochiweb?hl=.
>
>
>
Reply all
Reply to author
Forward
0 new messages