teleport/dist/server/daemon/stop.sh.in

34 lines
777 B
Bash
Raw Normal View History

2017-01-20 16:43:02 +00:00
#!/bin/bash
SRV=all
if [ x$1 != x ]; then
SRV=$1
fi
2017-03-26 16:24:23 +00:00
DAEMON_PATH={daemon_path}
2017-01-20 16:43:02 +00:00
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 )
2017-01-20 16:43:02 +00:00
if [ $result -gt 0 ]; then
ps ax | grep "$DAEMON_PATH/bin/tp_web start" | grep -v grep | kill `awk '{{print $1}}'`
2017-01-20 16:43:02 +00:00
echo 'done.'
else
echo "not running, skip."
fi
fi
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 )
2017-01-20 16:43:02 +00:00
if [ $result -gt 0 ]; then
ps ax | grep "$DAEMON_PATH/bin/tp_core start" | grep -v grep | kill `awk '{{print $1}}'`
2017-01-20 16:43:02 +00:00
echo 'done.'
else
echo "not running, skip."
fi
fi
2017-03-26 16:24:23 +00:00
exit 0