aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/manager/install.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-08-24 10:14:16 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-24 10:59:52 +0200
commit5eae61a48e48d90a57810355e673170b88247a49 (patch)
treecfee428900f6fb08015620c12c3f18b3583458ac /manager/install.go
parentversion: bump (diff)
downloadwireguard-windows-5eae61a48e48d90a57810355e673170b88247a49.tar.xz
wireguard-windows-5eae61a48e48d90a57810355e673170b88247a49.zip
tunnel: move Run into own module to reduce file size
Diffstat (limited to '')
-rw-r--r--manager/install.go22
1 files changed, 3 insertions, 19 deletions
diff --git a/manager/install.go b/manager/install.go
index 69a9ad3c..cff1289a 100644
--- a/manager/install.go
+++ b/manager/install.go
@@ -15,7 +15,7 @@ import (
"golang.org/x/sys/windows/svc/mgr"
"golang.zx2c4.com/wireguard/windows/conf"
- "golang.zx2c4.com/wireguard/windows/tunnel"
+ "golang.zx2c4.com/wireguard/windows/services"
)
var cachedServiceManager *mgr.Mgr
@@ -105,10 +105,6 @@ func UninstallManager() error {
return err2
}
-func RunManager() error {
- return svc.Run("WireGuardManager", &managerService{})
-}
-
func InstallTunnel(configPath string) error {
m, err := serviceManager()
if err != nil {
@@ -124,7 +120,7 @@ func InstallTunnel(configPath string) error {
return err
}
- serviceName, err := ServiceNameOfTunnel(name)
+ serviceName, err := services.ServiceNameOfTunnel(name)
if err != nil {
return err
}
@@ -177,7 +173,7 @@ func UninstallTunnel(name string) error {
if err != nil {
return err
}
- serviceName, err := ServiceNameOfTunnel(name)
+ serviceName, err := services.ServiceNameOfTunnel(name)
if err != nil {
return err
}
@@ -193,15 +189,3 @@ func UninstallTunnel(name string) error {
}
return err2
}
-
-func RunTunnel(confPath string) error {
- name, err := conf.NameFromPath(confPath)
- if err != nil {
- return err
- }
- serviceName, err := ServiceNameOfTunnel(name)
- if err != nil {
- return err
- }
- return svc.Run(serviceName, &tunnel.Service{confPath})
-}