diff options
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/commands/Tincd.kt')
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/commands/Tincd.kt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/commands/Tincd.kt b/app/src/main/java/org/pacien/tincapp/commands/Tincd.kt index d9c665d..44fcef5 100644 --- a/app/src/main/java/org/pacien/tincapp/commands/Tincd.kt +++ b/app/src/main/java/org/pacien/tincapp/commands/Tincd.kt | |||
@@ -7,7 +7,7 @@ import org.pacien.tincapp.context.AppPaths | |||
7 | */ | 7 | */ |
8 | object Tincd { | 8 | object Tincd { |
9 | 9 | ||
10 | fun start(netName: String, deviceFd: Int, ed25519PrivateKeyFd: Int? = null, rsaPrivateKeyFd: Int? = null) { | 10 | fun start(netName: String, deviceFd: Int, ed25519PrivateKeyFd: Int? = null, rsaPrivateKeyFd: Int? = null) = |
11 | Executor.forkExec(Command(AppPaths.tincd().absolutePath) | 11 | Executor.forkExec(Command(AppPaths.tincd().absolutePath) |
12 | .withOption("no-detach") | 12 | .withOption("no-detach") |
13 | .withOption("config", AppPaths.confDir(netName).absolutePath) | 13 | .withOption("config", AppPaths.confDir(netName).absolutePath) |
@@ -17,6 +17,5 @@ object Tincd { | |||
17 | .withOption("option", "Device=" + deviceFd) | 17 | .withOption("option", "Device=" + deviceFd) |
18 | .apply { if (ed25519PrivateKeyFd != null) withOption("option", "Ed25519PrivateKeyFile=/proc/self/fd/$ed25519PrivateKeyFd") } | 18 | .apply { if (ed25519PrivateKeyFd != null) withOption("option", "Ed25519PrivateKeyFile=/proc/self/fd/$ed25519PrivateKeyFd") } |
19 | .apply { if (rsaPrivateKeyFd != null) withOption("option", "PrivateKeyFile=/proc/self/fd/$rsaPrivateKeyFd") }) | 19 | .apply { if (rsaPrivateKeyFd != null) withOption("option", "PrivateKeyFile=/proc/self/fd/$rsaPrivateKeyFd") }) |
20 | } | ||
21 | 20 | ||
22 | } | 21 | } |