maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   autostart trouble (https://talk.maemo.org/showthread.php?t=47798)

b0unc3 2010-03-19 18:33

autostart trouble
 
Hi,

I have a little troubles using autostart to let my application starts automatically.
If I read correctly the autostart documentation the only thing I need to do is to write a script in /etc/event.d/ directory, and I've doing it so :

Code:

respawn
console none

start on started xsession
stop on stopping shutdown

exec /usr/bin/myapp

after that I rebooted, but the app still doesn't run automatically. By executing initctl list, I see my script in that list so I try initctl start myscript
there is the output:

Code:

myscript (start) waiting
myscript (start) starting
myscript (start) pre-start
myscript (start) spawned, process 2194
myscript (start) post-start, (main) process 2194
myscript (start) running, process 2194

The output seems quite good but, by running a ps I didn't see such a PID and my app is not running.
Any hint will be appreciated ;)

VDVsx 2010-03-19 19:00

Re: autostart trouble
 
Try this:

Code:

respawn
console none

start on started xsession
stop on stopping shutdown

script
  exec /usr/bin/myapp
end script

Note that can be a problem in your app, if it is crashing upstart might kick it and ignore the respawn flag.

b0unc3 2010-03-20 17:19

Re: autostart trouble
 
Quote:

Originally Posted by VDVsx (Post 573797)
Try this:

Code:

respawn
console none

start on started xsession
stop on stopping shutdown

script
  exec /usr/bin/myapp
end script

Note that can be a problem in your app, if it is crashing upstart might kick it and ignore the respawn flag.

Yes, there was a problem in my app that segfaults somewhere (especially when called by upstart) :(
Once I fixed it , upstart started working correctly.


All times are GMT. The time now is 05:02.

vBulletin® Version 3.8.8