Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The file you have installed is an <code>upstart</code> script. </p> <p>Try these options:</p> <pre><code># Note the full pathname exec /root/projects/myscript/script.py &gt; /tmp/some.txt </code></pre> <p>or</p> <pre><code># Note the shell command: exec sh -c "/root/projects/myscript/script.py &gt; /tmp/some.txt" </code></pre> <p>Confirm that the Python script is executable:</p> <pre><code>$ chmod +x /root/projects/myscript/script.py </code></pre> <p>Examine the system log files to see if there is a useful error message:</p> <pre><code>sudo vim /var/log/messages /var/log/syslog ... </code></pre> <p>EDIT: <code>upstart</code> ordinarily directly execs a script, so the shell redirection characters would have no effect. One exception is that <code>upstart</code> will invoke <code>/bin/sh</code> if there is a <code>$</code> or other special character. Apparently <code>&gt;</code> doesn't count. So, try this in your upstart script:</p> <pre><code>exec FOO=$$ /root/projects/myscript/script.py &gt; /tmp/output.txt 2&gt; /tmp/error.txt </code></pre> <p>Refs:</p> <ul> <li><a href="https://help.ubuntu.com/community/UbuntuBootupHowto" rel="nofollow">https://help.ubuntu.com/community/UbuntuBootupHowto</a></li> <li><a href="http://manpages.ubuntu.com/manpages/natty/en/man5/init.5.html" rel="nofollow">http://manpages.ubuntu.com/manpages/natty/en/man5/init.5.html</a></li> <li><a href="http://upstart.ubuntu.com/cookbook/" rel="nofollow">http://upstart.ubuntu.com/cookbook/</a> </li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload