package tech.nevets.tvpn.cli.commands

import tech.nevets.tvpn.cli.Command
import tech.nevets.tvpn.wg.WireGuardJNI
import kotlin.system.exitProcess

class UninstallTunnelServiceCmd : Command {
    override fun execute(args: Array<String>) {
        println("Executing UnInstallTunnelServiceCmd")
        println(WireGuardJNI().removeTunnel(args[1]))
        exitProcess(0)
    }

    override fun getName(): String {
        return "/uninstalltunnelservice"
    }

    override fun getUsage(): String {
        return "(tunnel name)"
    }

    override fun getDescription(): String {
        return "Stops and removes WireGuard Tunnel Service"
    }
}