我正在研究如何使用runit来运行古尼康。我正在查看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在这种情况下是无用的,因为搜索标志无用
Google在这种情况下是无用的,因为搜索标志无用
幸运的是,Bash参考手册可在线获得,网址为http://www.gnu.org/software/bash/manual/bashref.html。当您使用Google的“打击手册”时,这是第一打。§6.4“ Bash条件表达式”说:
-f file
如果文件存在且为常规文件,则为True 。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句