diff --git a/bin/wvp.sh b/bin/wvp.sh deleted file mode 100644 index d4d1c85..0000000 --- a/bin/wvp.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash - -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[0;33m' -BLUE='\033[0;34m' -NC='\033[0m' - -function log() { - message="[Polaris Log]: $1 " - case "$1" in - *"Fail"* | *"Error"* | *"请使用 root 或 sudo 权限运行此脚本"*) - echo -e "${RED}${message}${NC}" 2>&1 | tee -a - ;; - *"Success"*) - echo -e "${GREEN}${message}${NC}" 2>&1 | tee -a - ;; - *"Ignore"* | *"Jump"*) - echo -e "${YELLOW}${message}${NC}" 2>&1 | tee -a - ;; - *) - echo -e "${BLUE}${message}${NC}" 2>&1 | tee -a - ;; - esac -} -echo -cat </dev/null | head -n 1` -PID_FILE=pid.file -RUNNING=N -PWD=`pwd` - -######### DO NOT MODIFY ######## - -if [ -f $PID_FILE ]; then - PID=`cat $PID_FILE` - if [ ! -z "$PID" ] && kill -0 $PID 2>/dev/null; then - RUNNING=Y - fi -fi - -start() -{ - if [ $RUNNING == "Y" ]; then - echo "Application already started" - else - if [ -z "$JARFILE" ] - then - echo "ERROR: jar file not found" - else - nohup java $JAVA_OPT -Djava.security.egd=file:/dev/./urandom -jar $PWD/$JARFILE > nohup.out 2>&1 & - echo $! > $PID_FILE - echo "Application $JARFILE starting..." - tail -f nohup.out - fi - fi -} - -stop() -{ - if [ $RUNNING == "Y" ]; then - kill -9 $PID - rm -f $PID_FILE - echo "Application stopped" - else - echo "Application not running" - fi -} - -restart() -{ - stop - start -} - -case "$1" in - - 'start') - start - ;; - - 'stop') - stop - ;; - - 'restart') - restart - ;; - - *) - echo "Usage: $0 { start | stop | restart }" - exit 1 - ;; -esac -exit 0 - diff --git a/buildPackage.sh b/buildPackage.sh deleted file mode 100755 index 913a0d8..0000000 --- a/buildPackage.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# 获取当前日期并格式化为 YYYY-MM-DD 的形式 -current_date=$(date +"%Y-%m-%d") - -mkdir -p "$current_date"/数据库 - -cp -r ./数据库/2.7.3 "$current_date"/数据库 - -cp src/main/resources/配置详情.yml "$current_date" -cp src/main/resources/application-dev.yml "$current_date"/application.yml - -cp ./target/wvp-pro-*.jar "$current_date" - -zip -r "$current_date".zip "$current_date" - -rm -rf "$current_date" - -exit 0 -