diff options
author | Marvin Borner | 2019-05-08 17:58:09 +0200 |
---|---|---|
committer | Marvin Borner | 2019-05-08 17:58:09 +0200 |
commit | 7e3ef275f870737b853fda3e007e74de2112a7d5 (patch) | |
tree | 07c1b8f37fcb399f2cbffd23168604bc37299b3c /src/main/kotlin/DatabaseController.kt | |
parent | bd89369b508f30fc987b27cf6b34a22fbc8e5d97 (diff) |
Added install script
Co-authored-by: LarsVomMars <lars@kroenner.eu>
Diffstat (limited to 'src/main/kotlin/DatabaseController.kt')
-rw-r--r-- | src/main/kotlin/DatabaseController.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/DatabaseController.kt b/src/main/kotlin/DatabaseController.kt index 541bd06..8d48008 100644 --- a/src/main/kotlin/DatabaseController.kt +++ b/src/main/kotlin/DatabaseController.kt @@ -9,7 +9,8 @@ import org.joda.time.* import java.sql.* import java.util.logging.* -class DatabaseController(dbFileLocation: String = "main.db") { +class DatabaseController { + private val dbFileLocation = if (System.getProperty("os.name") != "Linux") "main.db" else "/usr/share/kloud/main.db" val db: Database = Database.connect("jdbc:sqlite:$dbFileLocation", "org.sqlite.JDBC") private val log = Logger.getLogger(this.javaClass.name) |