12345678910111213141516171819 |
- #!/bin/sh
- echo "Stopping service..."
- cd ../
- PROCESS=`pwd | xargs -i basename {}`
- PID=`ps -ef | grep "\./$PROCESS" | grep -v grep | awk '{print $2}'`
- kill -TERM $PID
- if [ $? != "0" ]; then
- echo "Can't stop."
- exit 1
- else
- echo "Service stoped."
- exit 0
- fi
|