mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
17.56.2021 812f12a69468d5b20fef7afc6cd82c130481e9ad
borgbutler-server/src/main/kotlin/de/micromata/borgbutler/server/BorgButlerApplication.kt
@@ -46,7 +46,8 @@
        // Preread configuration to get setting development mode for WebConfig (logging not yet initialized, so
        // reread configuration later after logging is available for getting log information on errors etc.)
        val configuration = ConfigurationHandler.readJsonConfigfile(File(borgButlerHome))
        RunningMode.webDevelopment = RunningMode.runningInIDE || (configuration as? ServerConfiguration)?.webDevelopmentMode == true
        RunningMode.webDevelopment =
            RunningMode.runningInIDE || (configuration as? ServerConfiguration)?.webDevelopmentMode == true
        if (System.getProperty("LOG_PATH").isNullOrBlank()) {
            // Needed by logback-spring.xml
            System.setProperty("LOG_PATH", borgButlerHome)
@@ -103,7 +104,11 @@
            BorgInstallation.getInstance().initialize()
            // 0.0.0.0 for Docker installations.
            val url = "http://$serverAddress:$serverPort/".replace("0.0.0.0", "127.0.0.1")
            var url = "http://$serverAddress:$serverPort/"
            if (serverAddress.contains("0.0.0.0")) {
                log.info { "Server bind address: $url" }
                url = url.replace("0.0.0.0", "127.0.0.1")
            }
            val uri = URI.create(url)
            val quietMode = line.hasOption('q')
            if (!quietMode && RunningMode.desktopSupportsBrowse && RunningMode.headlessMode) {
@@ -132,6 +137,7 @@
    @EventListener(ApplicationReadyEvent::class)
    open fun startApp() {
        log.info { "Start-up of BorgButler finished. Have fun!" }
    }
    @PreDestroy