Update script

This commit is contained in:
Teddysun 2016-01-28 22:10:52 +09:00
parent 5d0c35a626
commit 41506b47d6
2 changed files with 8 additions and 8 deletions

View File

@ -28,8 +28,8 @@ start(){
} }
stop(){ stop(){
pid=`ps -ef | grep -v grep | grep -v ps | grep -i "${BIN}" | awk '{print $2}'` pid=`ps -ef | grep -v grep | grep -i "${BIN}" | awk '{print $2}'`
if [ ! -z $pid ]; then if [[ ! -z $pid ]]; then
$BIN -c $conf -d stop $BIN -c $conf -d stop
RETVAL=$? RETVAL=$?
if [ "$RETVAL" = "0" ]; then if [ "$RETVAL" = "0" ]; then
@ -44,8 +44,8 @@ stop(){
} }
status(){ status(){
pid=`ps -ef | grep -v grep | grep -v ps | grep -i "${BIN}" | awk '{print $2}'` pid=`ps -ef | grep -v grep | grep -i "${BIN}" | awk '{print $2}'`
if [ -z $pid ]; then if [[ -z $pid ]]; then
echo "$name is not running" echo "$name is not running"
RETVAL=1 RETVAL=1
else else

View File

@ -26,8 +26,8 @@ start(){
} }
stop(){ stop(){
pid=`ps -ef | grep -v grep | grep -v ps | grep -i "${BIN}" | awk '{print $2}'` pid=`ps -ef | grep -v grep | grep -i "${BIN}" | awk '{print $2}'`
if [ ! -z $pid ]; then if [[ ! -z $pid ]]; then
$BIN -c $conf -d stop $BIN -c $conf -d stop
RETVAL=$? RETVAL=$?
if [ "$RETVAL" = "0" ]; then if [ "$RETVAL" = "0" ]; then
@ -42,8 +42,8 @@ stop(){
} }
status(){ status(){
pid=`ps -ef | grep -v grep | grep -v ps | grep -i "${BIN}" | awk '{print $2}'` pid=`ps -ef | grep -v grep | grep -i "${BIN}" | awk '{print $2}'`
if [ -z $pid ]; then if [[ -z $pid ]]; then
echo "$name is not running" echo "$name is not running"
RETVAL=1 RETVAL=1
else else