From 59cbe5d5bcf0b7331c4490f3539a213c6e2943b7 Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Fri, 30 Apr 2021 06:15:56 +0430 Subject: [PATCH 1/2] [SKIP CI] Yes, we do use git --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 951ed46..770db9c 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ You need this software packages installed in order to build this project: - Java Development Kit and Java Runtime Environment version 8 or newer(both Oracle JDK and OpenJDK works) - Nodejs LTS or latest - Yarn +- Git ### building the full-blown jar Run `./gradlew :webUI:copyBuild server:shadowJar`, the resulting built jar file will be `server/build/Tachidesk-vX.Y.Z-rxxx.jar`. ### building without `webUI` bundled(server only) From 1dd029559ec0f8ca9d5fb1ad703a83b1b19185d4 Mon Sep 17 00:00:00 2001 From: Syer10 Date: Mon, 3 May 2021 12:10:02 -0400 Subject: [PATCH 2/2] Stop Javalin properly on shutdown (#69) --- .../main/kotlin/ir/armor/tachidesk/server/JavalinSetup.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/src/main/kotlin/ir/armor/tachidesk/server/JavalinSetup.kt b/server/src/main/kotlin/ir/armor/tachidesk/server/JavalinSetup.kt index 511801c..0164cb2 100644 --- a/server/src/main/kotlin/ir/armor/tachidesk/server/JavalinSetup.kt +++ b/server/src/main/kotlin/ir/armor/tachidesk/server/JavalinSetup.kt @@ -44,6 +44,7 @@ import java.io.IOException import java.text.SimpleDateFormat import java.util.Date import java.util.concurrent.CompletableFuture +import kotlin.concurrent.thread /* * Copyright (C) Contributors to the Suwayomi project @@ -75,6 +76,13 @@ object JavalinSetup { } config.enableCorsForAllOrigins() }.start(serverConfig.ip, serverConfig.port) + + Runtime.getRuntime().addShutdownHook( + thread(start = false) { + app.stop() + } + ) + if (hasWebUiBundled && serverConfig.initialOpenInBrowserEnabled) { openInBrowser() }