Commit 8ea91020 authored by 陈刚's avatar 陈刚

启动配置-启动脚本

parent 30797f93
#!/bin/bash
JAR_LIB_DIR=../lib/
APP_NAME=link-auth*
APP_PATH=$JAR_LIB_DIR$APP_NAME
source ./conf/boot.conf
PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
if [ "$2" ]; then
PROFILES_ACTIVE=$2
fi
PID=$(ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}')
case "$1" in
start)
if [ "$PID" ]; then
kill -9 "$PID"
echo kill $APP_NAME "$PID"
fi
java -jar $APP_PATH --spring.profiles.active="$PROFILES_ACTIVE" --NACOS_HOST="${NACOS_HOST}" --NACOS_PORT="${NACOS_PORT}"> /dev/null 2>&1 &
echo $APP_NAME is start at profiles "$PROFILES_ACTIVE", mysql "${JOB_MYSQL_HOST}", nacos server "${NACOS_HOST}"
;;
stop)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo kill "$PID"
kill -9 "$PID"
echo $APP_NAME is stopped
fi
;;
status)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo $APP_NAME is running
fi
;;
*)
echo "useing auth-boot.sh (start|stop|status)"
esac
\ No newline at end of file
#!/bin/bash
JAR_LIB_DIR=../lib/
APP_NAME=link-bpm-start*
APP_PATH=$JAR_LIB_DIR$APP_NAME
source ./conf/boot.conf
PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
if [ "$2" ]; then
PROFILES_ACTIVE=$2
fi
PID=$(ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}')
case "$1" in
start)
if [ "$PID" ]; then
kill -9 "$PID"
echo kill $APP_NAME "$PID"
fi
java -jar $APP_PATH --REMOTE_IP="${DEV_REMOTE_IP}" --BPM_MYSQL_HOST="${BPM_MYSQL_HOST}" --BPM_MYSQL_PORT="${BPM_MYSQL_PORT}" --BPM_MYSQL_USER="${BPM_MYSQL_USER}" --BPM_MYSQL_PWD="${BPM_MYSQL_PWD}" --spring.profiles.active="$PROFILES_ACTIVE" --NACOS_HOST="${NACOS_HOST}" --NACOS_PORT="${NACOS_PORT}"> /dev/null 2>&1 &
echo $APP_NAME is start at profiles "$PROFILES_ACTIVE", mysql "${JOB_MYSQL_HOST}", nacos server "${NACOS_HOST}"
;;
stop)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo kill "$PID"
kill -9 "$PID"
echo $APP_NAME is stopped
fi
;;
status)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo $APP_NAME is running
fi
;;
*)
echo "useing bpm-boot.sh (start|stop|status)"
esac
\ No newline at end of file
(9!I
\ No newline at end of file
#!/bin/bash
JAR_LIB_DIR=../lib/
APP_NAME=link-file-start*
APP_PATH=$JAR_LIB_DIR$APP_NAME
source ./conf/boot.conf
PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
if [ "$2" ]; then
PROFILES_ACTIVE=$2
fi
PID=$(ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}')
case "$1" in
start)
if [ "$PID" ]; then
kill -9 "$PID"
echo kill $APP_NAME "$PID"
fi
java -jar $APP_PATH --REMOTE_IP="${DEV_REMOTE_IP}" --FILE_MYSQL_HOST="${FILE_MYSQL_HOST}" --FILE_MYSQL_PORT="${FILE_MYSQL_PORT}" --FILE_MYSQL_USER="${FILE_MYSQL_USER}" --FILE_MYSQL_PWD="${FILE_MYSQL_PWD}" --spring.profiles.active="$PROFILES_ACTIVE" --NACOS_HOST="${NACOS_HOST}" --NACOS_PORT="${NACOS_PORT}"> /dev/null 2>&1 &
echo $APP_NAME is start at profiles "$PROFILES_ACTIVE", mysql "${JOB_MYSQL_HOST}", nacos server "${NACOS_HOST}"
;;
stop)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo kill "$PID"
kill -9 "$PID"
echo $APP_NAME is stopped
fi
;;
status)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo $APP_NAME is running
fi
;;
*)
echo "useing file-boot.sh (start|stop|status)"
esac
\ No newline at end of file
#!/bin/bash
JAR_LIB_DIR=../lib/
APP_NAME=link-gateway*
APP_PATH=$JAR_LIB_DIR$APP_NAME
source ./conf/boot.conf
PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
if [ "$2" ]; then
PROFILES_ACTIVE=$2
fi
PID=$(ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}')
case "$1" in
start)
if [ "$PID" ]; then
kill -9 "$PID"
echo kill $APP_NAME "$PID"
fi
java -jar $APP_PATH --spring.profiles.active="$PROFILES_ACTIVE" --NACOS_HOST="${NACOS_HOST}" --NACOS_PORT="${NACOS_PORT}"> /dev/null 2>&1 &
echo $APP_NAME is start at profiles "$PROFILES_ACTIVE", mysql "${JOB_MYSQL_HOST}", nacos server "${NACOS_HOST}"
;;
stop)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo kill "$PID"
kill -9 "$PID"
echo $APP_NAME is stopped
fi
;;
status)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo $APP_NAME is running
fi
;;
*)
echo "useing gateway-boot.sh (start|stop|status)"
esac
\ No newline at end of file
#!/bin/bash
JAR_LIB_DIR=../lib/
APP_NAME=link-job-start*
APP_PATH=$JAR_LIB_DIR$APP_NAME
source ./conf/boot.conf
PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
if [ "$2" ]; then
PROFILES_ACTIVE=$2
fi
PID=$(ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}')
case "$1" in
start)
if [ "$PID" ]; then
kill -9 "$PID"
echo kill $APP_NAME "$PID"
fi
java -jar $APP_PATH --REMOTE_IP="${DEV_REMOTE_IP}" --JOB_MYSQL_HOST="${JOB_MYSQL_HOST}" --JOB_MYSQL_PORT="${JOB_MYSQL_PORT}" --JOB_MYSQL_USER="${JOB_MYSQL_USER}" --JOB_MYSQL_PWD="${JOB_MYSQL_PWD}" --spring.profiles.active="$PROFILES_ACTIVE" --NACOS_HOST="${NACOS_HOST}" --NACOS_PORT="${NACOS_PORT}"> /dev/null 2>&1 &
echo $APP_NAME is start at profiles "$PROFILES_ACTIVE", mysql "${JOB_MYSQL_HOST}", nacos server "${NACOS_HOST}"
;;
stop)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo kill "$PID"
kill -9 "$PID"
echo $APP_NAME is stopped
fi
;;
status)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo $APP_NAME is running
fi
;;
*)
echo "useing job-boot.sh (start|stop|status)"
esac
\ No newline at end of file
#!/bin/bash
source ./conf/boot.conf
PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
if [ "$2" ]; then
PROFILES_ACTIVE=$2
fi
case "$1" in
start)
./auth-boot.sh start "$PROFILES_ACTIVE"
./bpm-boot.sh start "$PROFILES_ACTIVE"
./file-boot.sh start "$PROFILES_ACTIVE"
./gateway-boot.sh start "$PROFILES_ACTIVE"
./job-boot.sh start "$PROFILES_ACTIVE"
./system-boot.sh start "$PROFILES_ACTIVE"
;;
stop)
./auth-boot.sh stop
./bpm-boot.sh stop
./file-boot.sh stop
./gateway-boot.sh stop
./job-boot.sh stop
./system-boot.sh stop
;;
status)
./auth-boot.sh status
./bpm-boot.sh status
./file-boot.sh status
./gateway-boot.sh status
./job-boot.sh status
./system-boot.sh status
;;
*)
echo "useing link-boot-all.sh (start|stop|status)"
;;
esac
#!/bin/bash
JAR_LIB_DIR=../lib/
APP_NAME=link-system-start*
APP_PATH=$JAR_LIB_DIR$APP_NAME
source ./conf/boot.conf
PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
if [ "$2" ]; then
PROFILES_ACTIVE=$2
fi
PID=$(ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}')
case "$1" in
start)
if [ "$PID" ]; then
kill -9 "$PID"
echo kill $APP_NAME "$PID"
fi
java -jar $APP_PATH --REMOTE_IP="${DEV_REMOTE_IP}" --SYS_MYSQL_HOST="${SYS_MYSQL_HOST}" --SYS_MYSQL_PORT="${SYS_MYSQL_PORT}" --SYS_MYSQL_USER="${SYS_MYSQL_USER}" --SYS_MYSQL_PWD="${SYS_MYSQL_PWD}" --spring.profiles.active="$PROFILES_ACTIVE" --NACOS_HOST="${NACOS_HOST}" --NACOS_PORT="${NACOS_PORT}"> /dev/null 2>&1 &
echo $APP_NAME is start at profiles "$PROFILES_ACTIVE", mysql "${JOB_MYSQL_HOST}", nacos server "${NACOS_HOST}"
;;
stop)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo kill "$PID"
kill -9 "$PID"
echo $APP_NAME is stopped
fi
;;
status)
if [ -z "$PID" ]
then
echo $APP_NAME is already stopped
else
echo $APP_NAME is running
fi
;;
*)
echo "useing system-boot.sh (start|stop|status)"
esac
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment