完善启动脚本
parent
5af3a97720
commit
02e116fd8a
|
@ -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
|
java -Dspring.config.location=..\conf\application.properties -jar jodconverter-web-1.5.8.RELEASE.jar -> ..\log\kkFileView.log
|
|
@ -1,2 +1,8 @@
|
||||||
#!/bin/bash
|
#!/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 &
|
nohup java -Dspring.config.location=../conf/application.properties -jar jodconverter-web-1.5.8.RELEASE.jar ../log/kkFileView.log 2>&1 &
|
|
@ -32,8 +32,10 @@ public class ConfigRefreshComponent {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
String userDir = System.getProperty("user.dir");
|
String userDir = System.getenv("KKFILEVIEW_BIN_FOLDER");
|
||||||
Properties properties1 = System.getProperties();
|
if (userDir == null) {
|
||||||
|
System.getProperty("user.dir");
|
||||||
|
}
|
||||||
if (userDir.endsWith("bin")) {
|
if (userDir.endsWith("bin")) {
|
||||||
userDir = userDir.substring(0, userDir.length() - 4);
|
userDir = userDir.substring(0, userDir.length() - 4);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue