From a94982db84dc60da2af8fc609fbd949f2c72f84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Sat, 6 Dec 2025 09:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 57 ------ pom.xml | 522 ----------------------------------------------------- run.sh | 122 ------------- 3 files changed, 701 deletions(-) delete mode 100644 install.sh delete mode 100644 pom.xml delete mode 100644 run.sh diff --git a/install.sh b/install.sh deleted file mode 100644 index 3d76cf1..0000000 --- a/install.sh +++ /dev/null @@ -1,57 +0,0 @@ -#! /bin/sh - -WORD_DIR=$(cd $(dirname $0); pwd) -SERVICE_NAME="wvp" - -# 检查是否为 root 用户 -if [ "$(id -u)" -ne 0 ]; then - echo "提示: 建议使用 root 用户执行此脚本,否则可能权限不足!" - read -p "继续?(y/n) " -n 1 -r - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - exit 1 - fi - echo -fi - -# 当前目录直接搜索(不含子目录) -jar_files=(*.jar) - -if [ ${#jar_files[@]} -eq 0 ]; then - echo "当前目录无 JAR 文件!" - exit 1 -fi - -# 遍历结果 -for jar in "${jar_files[@]}"; do - echo "找到 JAR 文件: $jar" -done - -# 写文件 -# 生成 Systemd 服务文件内容 -SERVICE_FILE="/etc/systemd/system/${SERVICE_NAME}.service" -cat << EOF | sudo tee "$SERVICE_FILE" > /dev/null -[Unit] -Description=${SERVICE_NAME} -After=syslog.target - -[Service] -User=$USER -WorkingDirectory=${WORD_DIR} -ExecStart=java -jar ${jar_files} -SuccessExitStatus=143 -Restart=on-failure -RestartSec=10s -Environment=SPRING_PROFILES_ACTIVE=prod - -[Install] -WantedBy=multi-user.target -EOF - -# 重载 Systemd 并启动服务 -sudo systemctl daemon-reload -sudo systemctl enable "$SERVICE_NAME" -sudo systemctl start "$SERVICE_NAME" - -# 验证服务状态 -echo "服务已安装!执行以下命令查看状态:" -echo "sudo systemctl status $SERVICE_NAME" diff --git a/pom.xml b/pom.xml deleted file mode 100644 index e6405c8..0000000 --- a/pom.xml +++ /dev/null @@ -1,522 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 3.4.4 - - - com.genersoft - wvp-pro - 2.7.4 - web video platform - 国标28181视频平台 - ${project.packaging} - - - - nexus-aliyun - Nexus aliyun - https://maven.aliyun.com/repository/public - default - - false - - - true - - - - ECC - https://maven.ecc.no/releases - - - - - - nexus-aliyun - Nexus aliyun - https://maven.aliyun.com/repository/public - - false - - - true - - - - - - UTF-8 - MMddHHmm - - - ${project.build.directory}/generated-snippets - ${project.basedir}/docs/asciidoc - ${project.build.directory}/asciidoc - ${project.build.directory}/asciidoc/html - ${project.build.directory}/asciidoc/pdf - - 21 - 21 - - - - - jar - - true - - - jar - - - - war - - war - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-jetty - - - - - javax.servlet - javax.servlet-api - 3.1.0 - provided - - - - - - - - org.springframework.boot - spring-boot-starter-data-redis - - - org.springframework.boot - spring-boot-starter-cache - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-websocket - - - - - org.springframework.boot - spring-boot-starter-aop - - - - org.springframework.session - spring-session-core - - - - org.springframework.boot - spring-boot-configuration-processor - true - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 3.0.4 - - - com.zaxxer - HikariCP - - - - - org.springframework.boot - spring-boot-starter-security - - - - org.springframework.boot - spring-boot-starter-jdbc - - - - - com.h2database - h2 - 2.3.232 - - - - - com.mysql - mysql-connector-j - 8.2.0 - - - - - org.postgresql - postgresql - 42.5.1 - - - - - - - com.kingbase - kingbase8 - 8.6.0 - system - ${basedir}/libs/jdbc-aarch/kingbase8-8.6.0.jar - - - com.kingbase - kingbase8 - 8.6.0 - system - ${basedir}/libs/jdbc-x86/kingbase8-8.6.0.jar - - - - - - - - - - - com.github.pagehelper - pagehelper-spring-boot-starter - 2.1.1 - - - - - org.springdoc - springdoc-openapi-starter-webmvc-ui - 2.8.6 - - - org.springdoc - springdoc-openapi-starter-webmvc-api - 2.8.6 - - - org.springdoc - springdoc-openapi-security - 1.8.0 - - - - com.github.xiaoymin - knife4j-openapi3-jakarta-spring-boot-starter - 4.5.0 - - - - - - - - - - - - javax.sip - jain-sip-ri - 1.3.0-91 - - - - - org.slf4j - log4j-over-slf4j - 2.0.17 - - - - - org.dom4j - dom4j - 2.1.4 - - - - - com.alibaba.fastjson2 - fastjson2 - 2.0.57 - - - com.alibaba.fastjson2 - fastjson2-extension - 2.0.57 - - - com.alibaba.fastjson2 - fastjson2-extension-spring5 - 2.0.57 - - - - - com.squareup.okhttp3 - okhttp - 4.12.0 - - - - - com.squareup.okhttp3 - logging-interceptor - 4.12.0 - - - - - io.github.rburgst - okhttp-digest - 3.1.1 - - - - - - - - - - - - org.bitbucket.b_c - jose4j - 0.9.6 - - - - org.apache.httpcomponents - httpclient - 4.5.14 - - - - - com.alibaba - easyexcel - 4.0.3 - - - org.apache.commons - commons-compress - - - - - org.apache.commons - commons-compress - 1.27.1 - - - - - com.github.oshi - oshi-core - 6.6.5 - - - - - com.google.guava - guava - 33.4.8-jre - - - - - org.apache.ftpserver - ftpserver-core - 1.2.1 - - - - org.apache.ftpserver - ftplet-api - 1.2.1 - - - - - org.projectlombok - lombok - 1.18.38 - provided - - - - - - - - - - - io.github.sevdokimov.logviewer - log-viewer-spring-boot - 1.0.10 - - - - cn.hutool - hutool-all - 5.8.38 - - - - org.bouncycastle - bcpkix-jdk18on - 1.78.1 - - - - - no.ecc.vectortile - java-vector-tile - 1.4.1 - - - - - org.locationtech.jts - jts-core - 1.18.2 - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - ${project.artifactId}-${project.version}-${maven.build.timestamp} - - - org.springframework.boot - spring-boot-maven-plugin - 3.4.10 - - true - true - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.14.0 - - 21 - 21 - - - org.projectlombok - lombok - 1.18.30 - - - - - - - pl.project13.maven - git-commit-id-plugin - 4.9.10 - - true - false - yyyyMMdd - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.2.5 - - true - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.4.2 - - - **/配置详情.yml - **/application.yml - **/application-*.yml - **/local.jks - **/install.sh - - - - - maven-resources-plugin - - - copy-resources - package - - copy-resources - - - - - src/main/resources - - application.yml - application-*.yml - install.sh - - - - ${project.build.directory} - - - - - - - - src/main/resources - - - src/main/java - - **/*.xml - - - - - diff --git a/run.sh b/run.sh deleted file mode 100644 index f17040b..0000000 --- a/run.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash -# JDK路径 -export JAVA_HOME=/usr/local/java/jdk1.8.0_202 -export JRE_HOME=${JAVA_HOME}/jre -export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib -export PATH=${JAVA_HOME}/bin:$PATH - -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 - *"失败"* | *"错误"* | *"请使用 root 或 sudo 权限运行此脚本"*) - echo -e "${RED}${message}${NC}" 2>&1 | tee -a - ;; - *"成功"*) - echo -e "${GREEN}${message}${NC}" 2>&1 | tee -a - ;; - *"忽略"* | *"跳过"*) - echo -e "${YELLOW}${message}${NC}" 2>&1 | tee -a - ;; - *) - echo -e "${BLUE}${message}${NC}" 2>&1 | tee -a - ;; - esac -} - -echo -cat < /dev/null 2>&1 & - fi - log "流媒体服务开启成功" -} - -function stop() { - log "======================= 停止流媒体服务 =======================" - - PID="" - query() { - PID=$(ps -ef | grep java | grep $AppName | grep -v grep | awk '{print $2}') - } - query - if [ x"$PID" != x"" ]; then - log "进程PID: $PID" - kill -TERM $PID - log "$AppName (pid:$PID) exiting..." - while [ x"$PID" != x"" ]; do - sleep 1 - query - done - log "成功:$AppName exited." - else - log "忽略:进程不存在" - fi -} - -function status() { - log "======================= 运行状态 =======================" - log "" - - PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'` - if [ $PID != 0 ]; then - log "进程PID: $PID" - log "$AppName is running..." - else - log "$AppName is not running..." - fi - log "" - log "========================================================" -} - -function restart() { - stop - sleep 3 - start -} - -case $1 in -start) - start - ;; -stop) - stop - ;; -restart) - restart - ;; -status) - status - ;; -*) ;; - -esac -