From 84b544cea9a2b4993e56f5df457ccd2fbf7615a5 Mon Sep 17 00:00:00 2001 From: LamGC Date: Fri, 1 May 2020 22:28:15 +0800 Subject: [PATCH] =?UTF-8?q?[Change]=20Main=20=E8=B0=83=E6=95=B4=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E8=BE=93=E5=87=BA=E7=BA=A7=E5=88=AB,=20=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA=E5=86=85=E5=AE=B9?= =?UTF-8?q?;=20[Change]=20Dockerfile.sample=20=E8=B0=83=E6=95=B4=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E5=86=85=E5=BA=94=E7=94=A8=E8=BF=90=E8=A1=8C=E8=B7=AF?= =?UTF-8?q?=E5=BE=84;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile.sample | 7 +++---- src/main/java/net/lamgc/cgj/Main.java | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile.sample b/Dockerfile.sample index aa2fb14..3f8636d 100644 --- a/Dockerfile.sample +++ b/Dockerfile.sample @@ -1,8 +1,7 @@ FROM openjdk:8u252-jre ENV jarFileName=ContentGrabbingJi-exec.jar -COPY ${jarFileName} /program/CGJ.jar -RUN mkdir /program/data +COPY ${jarFileName} /CGJ.jar +RUN mkdir /data/ -WORKDIR /program/data -CMD java -jar /program/CGJ.jar botMode \ No newline at end of file +CMD java -Dcgj.logsPath=/data/logs -jar /CGJ.jar botMode -botDataDir=/data \ No newline at end of file diff --git a/src/main/java/net/lamgc/cgj/Main.java b/src/main/java/net/lamgc/cgj/Main.java index 820be95..f6f3493 100644 --- a/src/main/java/net/lamgc/cgj/Main.java +++ b/src/main/java/net/lamgc/cgj/Main.java @@ -52,6 +52,7 @@ public class Main { public static void main(String[] args) throws IOException, ClassNotFoundException { log.trace("ContentGrabbingJi 正在启动..."); + log.debug("Args: {}, LogsPath: {}", Arrays.toString(args), System.getProperty("cgj.logsPath")); log.debug("运行目录: {}", System.getProperty("user.dir")); ArgumentsProperties argsProp = new ArgumentsProperties(args); if(argsProp.containsKey("proxy")) { @@ -85,7 +86,7 @@ public class Main { File cookieStoreFile = new File(System.getProperty("cgj.botDataDir"), "cookies.store"); if(!cookieStoreFile.exists()) { - log.error("未找到cookies.store文件, 是否启动PixivLoginProxyServer? (yes/no)"); + log.warn("未找到cookies.store文件, 是否启动PixivLoginProxyServer? (yes/no)"); Scanner scanner = new Scanner(System.in); if(scanner.nextLine().equalsIgnoreCase("yes")) { startPixivLoginProxyServer();