<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body style="font-family: Arial; font-size: 13px;" bgcolor="#ffffff"
    text="#000000">
    <div style="font-family: Arial; font-size: 13px;"><font face="Arial">Hello
        there,<br>
        <br>
        I don't know where to go with this question, so i hope i can try
        it here.<br>
        <br>
        I have created an upstart config to start an application via
        screen.<br>
        This way that application can be entered via screen when needed.<br>
        <br>
        The application starts correctly via the init conf, but it
        doesn't have the correct PID.<br>
        I tried expect daemon, fork, and non, but this doesn't work.<br>
        With daemon and fork it starts, but not the correct PID, and
        status myapp, thinks it is still running.<br>
        With no expect, it also starts, but then i thinks it isn't
        running anymore.<br>
        <br>
        What can i do to fix/track this problem?<br>
        <br>
        Here is the conf:<br>
        ---<br>
        description "MyApp - startup script"<br>
        <br>
        start on runlevel [2345]<br>
        stop on runlevel [016]<br>
        <br>
        expect daemon<br>
        #expect fork<br>
        console output<br>
        <br>
        script<br>
                cd /apps/inbox<br>
                exec su myapps -c "screen -d -m -S MYAPP java -jar
        MyApp.jar"<br>
        end script<br>
        ---<br>
      </font></div>
  </body>
</html>