Skip to content

Commit

Permalink
fix control for mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
licong08 committed Oct 26, 2017
1 parent ea649ce commit b26dfeb
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions control.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
#!/bin/bash

if [ ! -n "$1" ] then
echo "Usages: bash control.sh [start|stop|reload|terminate]"
exit 0
fi

if [ $1 = start ] then
psid=`ps aux | grep "uwsgi" | grep -v "grep" | wc -l`
if [ $psid -gt 4 ] then
echo "uwsgi is running!"
exit 0
else
uwsgi /etc/uwsgi.ini
echo "Start uwsgi service [OK]"
fi
elif [ $1 = stop ];then
killall -9 uwsgi
echo "Stop uwsgi service [OK]"
elif [ $1 = restart ];then
killall -9 uwsgi
/usr/bin/uwsgi --ini /etc/uwsgi.ini
echo "Restart uwsgi service [OK]"

else
echo "Usages: sh uwsgiserver.sh [start|stop|restart]"
fi


#! /bin/sh

readonly G_HOME=`pwd`
Expand Down

0 comments on commit b26dfeb

Please sign in to comment.