update build.sh

This commit is contained in:
SAM2O2O 2019-11-27 23:43:12 +08:00
parent 82ad102648
commit 6717f02fd0
5 changed files with 15 additions and 57 deletions

6
.gitignore vendored
View File

@ -6,9 +6,9 @@
*.iml *.iml
target/ target/
.DS_Store .DS_Store
openzalyDB.sqlite3 *.sqlite3
stdout.log *.log
openzaly-server.jar windchat-server.jar
site-file/ site-file/
site-logs/ site-logs/
openzaly-server.config openzaly-server.config

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Copyright 2018-2028 Akaxin Group # Copyright 2018-2028 WindChat Group
# #
# Licensed to the Apache Software Foundation (ASF) under one # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file # or more contributor license agreements. See the NOTICE file
@ -24,4 +24,4 @@
cd `dirname $0` cd `dirname $0`
mvn -T 2C clean package mvn -T 2C clean package
cp openzaly-boot/target/openzaly-boot-*-SNAPSHOT.jar openzaly-server.jar cp windchat-boot/target/windchat-boot-*-SNAPSHOT.jar windchat-server.jar

View File

@ -3,24 +3,6 @@ PORT=$1
PORT2=$2 PORT2=$2
#### echo akaxin logo and desc #### echo akaxin logo and desc
echo "
/ \
/ . \
\ . \
/ \ \ / _ _ __ _ __ __ ___ _ _
/ . \ | / / \ / \ | |/ / / \ \ \/ / |_ _| | \ | |
/ . _ \ / / . \ / _ \ | ' / / _ \ \ / | | | \| |
\ / / \ - . / / ___ \ | . \ / ___ \ / \ | | | |\ |
\ / / | \ / /_/ \_\ |_|\_\ /_/ \_\ /_/\_\ |___| |_| \_|
/ . \ \ /
\ . \
\ /
\ /
Akaxin is an open source and free proprietary IM softwareyou can build private openzaly-server for everyone in any server.
"
##set tcp port ##set tcp port
if [ -n $PORT ]; then if [ -n $PORT ]; then

View File

@ -23,8 +23,8 @@ PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}')
###if server is running, exit and echo error ###if server is running, exit and echo error
if [ $PID > 0 ]; then if [ $PID > 0 ]; then
echo "[ERROR] windchat is running [PID:"$PID"]" echo "[ERROR] WindChat is running [PID:"$PID"]"
echo "[ERROR] windchat start failure" echo "[ERROR] WindChat start failure"
echo "" echo ""
exit exit
fi fi
@ -34,10 +34,10 @@ java -Dsite.port=$PORT -Dhttp.port=$PORT2 -jar openzaly-server.jar >>stdout.log
PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}') PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}')
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "[OK] openzaly-server tcp-port:"$PORT",http-port:$PORT2,PID:$PID" echo "[OK] WindChat tcp-port:"$PORT",http-port:$PORT2,PID:$PID"
echo "[OK] openzaly-server is started successfully [PID:"$PID"]" echo "[OK] WindChat is started successfully [PID:"$PID"]"
else else
echo "[ERROR] openzaly-server is started failed" echo "[ERROR] WindChat is started failed"
echo "exit..." echo "exit..."
echo "" echo ""
exit exit

34
stop.sh
View File

@ -4,44 +4,20 @@ PORT=$1
IS_RESTART=$2 IS_RESTART=$2
JAVA_JAR="openzaly-server" JAVA_JAR="openzaly-server"
## IS_RESTART not exist ,echo info
if [ -z $IS_RESTART ]; then
#### echo akaxin logo and desc
echo "
/ \
/ . \
\ . \
/ \ \ / _ _ __ _ __ __ ___ _ _
/ . \ | / / \ / \ | |/ / / \ \ \/ / |_ _| | \ | |
/ . _ \ / / . \ / _ \ | ' / / _ \ \ / | | | \| |
\ / / \ - . / / ___ \ | . \ / ___ \ / \ | | | |\ |
\ / / | \ / /_/ \_\ |_|\_\ /_/ \_\ /_/\_\ |___| |_| \_|
/ . \ \ /
\ . \
\ /
\ /
Akaxin is an open source and free proprietary IM softwareyou can build private openzaly-server for everyone in any server.
"
fi
##set tcp port ##set tcp port
if [ -n $PORT ]; then if [ -n $PORT ]; then
PORT=2021 PORT=2021
fi fi
echo "[OK] openzaly-server is closing [PORT:"$PORT"]" echo "[OK] WindChat is closing [PORT:"$PORT"]"
PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}') PID=$(ps -ef|grep $JAVA_JAR|grep $PORT |head -1| awk '{printf $2}')
#if [ $? -eq 0 ]; then #if [ $? -eq 0 ]; then
if [ $PID ]; then if [ $PID ]; then
echo "[OK] openzaly-server is running on [PID:"$PID"]" echo "[OK] WindChat is running on [PID:"$PID"]"
else else
echo "[ERROR] openzaly-server stop failure, as it's not running." echo "[ERROR] WindChat stop failure, as it's not running."
echo "" echo ""
exit exit
fi fi
@ -50,9 +26,9 @@ fi
kill -9 ${PID} kill -9 ${PID}
if [ $? -eq 0 ];then if [ $? -eq 0 ];then
echo "[OK] openzaly-server is stoped [PORT:"$PORT" PID:"$PID"]" echo "[OK] WindChat is stoped [PORT:"$PORT" PID:"$PID"]"
else else
echo "[ERROR] openzaly-server stop failure." echo "[ERROR] WindChat stop failure."
fi fi
echo "" echo ""