Last active
May 10, 2019 01:43
-
-
Save cpusoft/3c87b5c4bf53f3749064b9495fbd3854 to your computer and use it in GitHub Desktop.
shutdown.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pid=`ps -ef|grep '/web/tomcat/'|grep -v grep|awk '{print $2}'` | |
| echo "The current process id is $pid" | |
| if [ "$pid" = "" ]; then | |
| echo "pid is null" | |
| else | |
| kill -9 $pid | |
| echo "shutdown success" | |
| fi | |
| pids=`ps -ef|grep 'manage.py'|grep -v grep|awk '{print $2}'` | |
| echo "The current process id is $pids" | |
| for pid in $pids | |
| do | |
| if [ "$pid" = "" ]; then | |
| echo "pid is null" | |
| else | |
| kill -9 $pid | |
| echo "shutdown success" | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment