#!/bin/bash
#
# tomcat startup script for the mining-engine server
# chkconfig: 2345 80 20
# description: start the mining-engine deamon
#
# Source function library
. /etc/rc.d/init.d/functions
prog=mining-engine
JAVA_HOME=/home/smartbi/jdk1.8.0_181/ #注意替换成实际的JAVA部署路径
export JAVA_HOME
CATALANA_HOME=/data/smartbi-mining-engine-bin/engine/ #注意替换成实际的数据挖掘部署路径
export CATALINA_HOME
case "$1" in
start)
echo "Starting mining-service..."
$CATALANA_HOME/sbin/experiment-daemon.sh start
;;
stop)
echo "Stopping mining-service..."
$CATALANA_HOME/sbin/experiment-daemon.sh stop
;;
restart)
echo "Stopping mining-service..."
$CATALANA_HOME/sbin/experiment-daemon.sh stop
sleep 2
echo
echo "Starting mining-service..."
$CATALANA_HOME/sbin/experiment-daemon.sh start
;;
*)
echo "Usage: $prog {start|stop|restart}"
;;
esac
exit 0