diff options
author | Marvin Borner | 2019-05-17 20:41:29 +0200 |
---|---|---|
committer | Marvin Borner | 2019-05-17 20:41:29 +0200 |
commit | b53ce4dac1429118888297989ec0746ec9e0fd0c (patch) | |
tree | 358e1f7dc55409b6b6b664d3c6a9e3d29d2dc9bb /src/main/kotlin/App.kt | |
parent | 270f58144eac1797ef55567d644d6213f315bb15 (diff) |
Added final improvements for release 1.0v1.0
Co-authored-by: LarsVomMars <lars@kroenner.eu>
Diffstat (limited to 'src/main/kotlin/App.kt')
-rw-r--r-- | src/main/kotlin/App.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/kotlin/App.kt b/src/main/kotlin/App.kt index d9290ba..b6b5a14 100644 --- a/src/main/kotlin/App.kt +++ b/src/main/kotlin/App.kt @@ -12,8 +12,9 @@ import org.slf4j.* import java.net.* import kotlin.system.* -const val debug = true +const val debug = false var silent = true +var port = 7000 // TODO: Add abstract and secure file home support for windows/BSD/macOS val fileHome = if (System.getProperty("os.name") != "Linux" || debug) "files" else "/usr/share/kloud/files" val databaseController = DatabaseController() @@ -23,6 +24,7 @@ private val log = LoggerFactory.getLogger("App.kt") fun main(args: Array<String>) { val app = startServer(args) + log.info("Successfully started server on port $port") // Set up templating RockerRuntime.getInstance().isReloading = false @@ -191,7 +193,6 @@ fun roleManager(handler: Handler, ctx: Context, permittedRoles: Set<Role>) { */ fun startServer(args: Array<String>): Javalin { var runServer = true - var port = 7000 args.forEachIndexed { index, element -> run { @@ -226,7 +227,8 @@ fun startServer(args: Array<String>): Javalin { disableStartupBanner() }.start() } catch (_: Exception) { - throw PortUnreachableException("Port already in use!") + log.info("Port $port already in use!") + exitProcess(1) } } else exitProcess(1) } |