#!/bin/bash SRV=all if [ x$1 != x ]; then SRV=$1 fi DAEMON_PATH={daemon_path} if [ $SRV == all ] || [ $SRV == core ] ; then echo -n "stoping teleport core server ... " result=$( ps ax | grep "$DAEMON_PATH/bin/tp_core start" | grep -v grep | wc -l ) if [ $result -gt 0 ]; then ps ax | grep "$DAEMON_PATH/bin/tp_core start" | grep -v grep | kill `awk '{{print $1}}'` echo 'done.' else echo "not running, skip." fi fi if [ $SRV == all ] || [ $SRV == web ] ; then echo -n "stoping teleport web ... " result=$( ps ax | grep "$DAEMON_PATH/bin/tp_web start" | grep -v grep | wc -l ) if [ $result -gt 0 ]; then ps ax | grep "$DAEMON_PATH/bin/tp_web start" | grep -v grep | kill `awk '{{print $1}}'` echo 'done.' else echo "not running, skip." fi fi exit 0