aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/org/pacien/tincapp/commands/Tincd.kt
diff options
context:
space:
mode:
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.kt13
1 files changed, 5 insertions, 8 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 9f2491e..19ebfbd 100644
--- a/app/src/main/java/org/pacien/tincapp/commands/Tincd.kt
+++ b/app/src/main/java/org/pacien/tincapp/commands/Tincd.kt
@@ -1,9 +1,6 @@
1package org.pacien.tincapp.commands 1package org.pacien.tincapp.commands
2 2
3import android.content.Context
4
5import org.pacien.tincapp.context.AppPaths 3import org.pacien.tincapp.context.AppPaths
6
7import java.io.IOException 4import java.io.IOException
8 5
9/** 6/**
@@ -12,12 +9,12 @@ import java.io.IOException
12object Tincd { 9object Tincd {
13 10
14 @Throws(IOException::class) 11 @Throws(IOException::class)
15 fun start(ctx: Context, netName: String, fd: Int) { 12 fun start(netName: String, fd: Int) {
16 Executor.forkExec(Command(AppPaths.tincd(ctx).absolutePath) 13 Executor.forkExec(Command(AppPaths.tincd().absolutePath)
17 .withOption("no-detach") 14 .withOption("no-detach")
18 .withOption("config", AppPaths.confDir(ctx, netName).absolutePath) 15 .withOption("config", AppPaths.confDir(netName).absolutePath)
19 .withOption("pidfile", AppPaths.pidFile(ctx, netName).absolutePath) 16 .withOption("pidfile", AppPaths.pidFile(netName).absolutePath)
20 .withOption("logfile", AppPaths.logFile(ctx, netName).absolutePath) 17 .withOption("logfile", AppPaths.logFile(netName).absolutePath)
21 .withOption("option", "DeviceType=fd") 18 .withOption("option", "DeviceType=fd")
22 .withOption("option", "Device=" + fd)) 19 .withOption("option", "Device=" + fd))
23 } 20 }