我正在尝试制作一个小脚本来为我正在制作的 python 网站启动 gunicorn。我稍微修改了在https://github.com/benoitc/gunicorn/blob/master/examples/gunicorn_rc 上找到的脚本。这是我的版本。
#!/bin/sh
GUNICORN=/usr/local/bin/gunicorn
ROOT=/srv/mobile-site/app
PID=/var/run/gunicorn.pid
APP=mobilecms:app
if [ -f $PID ]; then rm $PID fi
cd $ROOT
exec $GUNICORN -b 127.0.0.1:8080 -w 8 -k gevent --pidfile=$PID $APP
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试运行脚本时,它显示此错误
/etc/init.d/gunicorn: 13: Syntax error: end of file unexpected (expecting "fi")
Run Code Online (Sandbox Code Playgroud)
有谁知道出了什么问题?