Don't know why this small shell script wont work
Posted
by
tominated
on Super User
See other posts from Super User
or by tominated
Published on 2011-03-04T06:20:05Z
Indexed on
2011/03/04
7:27 UTC
Read the original article
Hit count: 598
Hi,
I'm trying to make a small script to start up gunicorn for a python website I'm making. I have modified the script found at https://github.com/benoitc/gunicorn/blob/master/examples/gunicorn_rc slightly. Here's my version.
#!/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
When I try to run the script though, it shows this error
/etc/init.d/gunicorn: 13: Syntax error: end of file unexpected (expecting "fi")
Does anyone know what's wrong?
© Super User or respective owner