自用的几个小Shell Script Django(FastCGI) & Nginx

自用的几个小Shell Script Django(FastCGI) & Nginx

----------reload_nginx.sh--------------
#!/bin/bash

NGDIR="/usr/local/nginx/logs"
PIDFILE="$NGDIR/nginx.pid"

if [ -f $PIDFILE ]; then
    kill -HUP `cat -- $PIDFILE`
fi

----------start_nginx.sh-------------
#!/bin/bash

NGINX="/usr/local/nginx/sbin/nginx"
exec $NGINX

----------shut_fastcgi.sh----------
#!/bin/bash

PROJDIR="/Applications/xampp/xamppfiles/htdocs/Adanmoo"
PIDFILE="$PROJDIR/django.pid"
PORT="8001"
HOST="127.0.0.1"

cd $PROJDIR

kill `cat -- $PIDFILE`
rm -f -- $PIDFILE

-----------reload_fastcgi.sh----------
#!/bin/bash

PROJDIR="/Applications/xampp/xamppfiles/htdocs/Adanmoo"
PIDFILE="$PROJDIR/django.pid"
PORT="8001"
HOST="127.0.0.1"

cd $PROJDIR

if [ -f $PIDFILE ]; then
    kill `cat -- $PIDFILE`
    rm -f -- $PIDFILE
fi

exec python manage.py runfcgi method=threaded host=$HOST port=$PORT pidfile=$PIDFILE

你可能感兴趣的:(nginx,nginx,职场,&,script,休闲,自用的几个小Shell,Django(FastCGI))