Commit 02e116fd authored by 陈精华's avatar 陈精华 Committed by kl

完善启动脚本

parent 5af3a977
@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
\ No newline at end of file
#!/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 &
\ No newline at end of file
......@@ -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);
}
......
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