我在看如何使用
runit to run gunicorn.我正在查看bash文件,我不知道-f $PID在做什么
- #!/bin/sh
- GUNICORN=/usr/local/bin/gunicorn
- ROOT=/path/to/project
- PID=/var/run/gunicorn.pid
- APP=main:application
- if [ -f $PID ]; then rm $PID; fi
- cd $ROOT
- exec $GUNICORN -c $ROOT/gunicorn.conf.py --pid=$PID $APP
谷歌在这种情况下毫无用处,因为搜索标志是没用的
Google is useless in this case because searching for flags is useless
幸运的是,Bash参考手册可以在线获取,时间是http://www.gnu.org/software/bash/manual/bashref.html.这是谷歌第一次使用“Bash手册”. §6.4 “Bash Conditional Expressions”说:
-f file
True if file exists and is a regular file.