一、概述
工作中使用uwsgi时,每次需要进入到工作目录,去执行uwsgi相关命令,比较繁琐。这里整理了一个uwsgi重启脚本!
根据参考链接,修改了部分内容(定义了变量,修复了一些bug,增加了颜色输出)
#!/bin/bash INI="/www/mysite1/uwsgi/uwsgi.ini" UWSGI="/virtualenvs/venv/bin/uwsgi" PSID="ps aux | grep "uwsgi"| grep -v "grep" | wc -l" if [ ! -n "$1" ] then content="Usages: sh uwsgiserver.sh [start|stop|restart]" echo -e "