Browse Source

完善启动脚本

pull/9/head
陈精华 6 years ago committed by kl
parent
commit
02e116fd8a
  1. 6
      jodconverter-web/src/main/bin/startup.bat
  2. 6
      jodconverter-web/src/main/bin/startup.sh
  3. 6
      jodconverter-web/src/main/java/cn/keking/config/ConfigRefreshComponent.java

6
jodconverter-web/src/main/bin/startup.bat

@ -1 +1,7 @@
@echo off
set "KKFILEVIEW_BIN_FOLDER=%cd%"
cd "%KKFILEVIEW_BIN_FOLDER%"
echo Using KKFILEVIEW_BIN_FOLDER %KKFILEVIEW_BIN_FOLDER%
echo Starting kkFileView...
echo Please check log file for more information
java -Dspring.config.location=..\conf\application.properties -jar jodconverter-web-1.5.8.RELEASE.jar -> ..\log\kkFileView.log

6
jodconverter-web/src/main/bin/startup.sh

@ -1,2 +1,8 @@
#!/bin/bash
KKFILEVIEW_BIN_FOLDER=$(cd "$(dirname "$0")";pwd)
export KKFILEVIEW_BIN_FOLDER=$KKFILEVIEW_BIN_FOLDER
cd $KKFILEVIEW_BIN_FOLDER
echo "Using KKFILEVIEW_BIN_FOLDER $KKFILEVIEW_BIN_FOLDER"
echo "Starting kkFileView..."
echo "Please check log file for more information"
nohup java -Dspring.config.location=../conf/application.properties -jar jodconverter-web-1.5.8.RELEASE.jar ../log/kkFileView.log 2>&1 &

6
jodconverter-web/src/main/java/cn/keking/config/ConfigRefreshComponent.java

@ -32,8 +32,10 @@ public class ConfigRefreshComponent {
public void run() {
try {
Properties properties = new Properties();
String userDir = System.getProperty("user.dir");
Properties properties1 = System.getProperties();
String userDir = System.getenv("KKFILEVIEW_BIN_FOLDER");
if (userDir == null) {
System.getProperty("user.dir");
}
if (userDir.endsWith("bin")) {
userDir = userDir.substring(0, userDir.length() - 4);
}

Loading…
Cancel
Save