擅长:python、mysql、java
<p>试着把这个当作你的挂件。它可能有助于定位错误(扩展Ken的建议):</p>
<pre><code>#!/bin/bash
# set -e makes the script exit on the first error
set -e
# set -x will add debug trace information to all of your commands
set -x
echo "$0 starting"
#python createdb.py
python training/manage.py syncdb noinput
python mkadmin.py
mkdir -p /home/dotcloud/data/media /home/dotcloud/volatile/static
python training/manage.py collectstatic noinput
echo "$0 complete"
</code></pre>
<p>有关更多调试信息,请访问<a href="http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html" rel="nofollow">http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html</a></p>