diff options
author | Ruben Pollan <meskio@sindominio.net> | 2019-01-15 17:19:19 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2019-01-15 17:26:06 +0100 |
commit | 52d7fa7c91dd5bad49f07e33956681b5e341c6fa (patch) | |
tree | 0cd14b39203ef5652ee2c76ac27320db4abb4ef8 /pkg/standalone/launcher_linux.go | |
parent | 80b6aef1206fb63f1a2985f003f6b484a23bb949 (diff) |
[feat] move provider configuration into a set of constants
Diffstat (limited to 'pkg/standalone/launcher_linux.go')
-rw-r--r-- | pkg/standalone/launcher_linux.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/standalone/launcher_linux.go b/pkg/standalone/launcher_linux.go index 672eb1f..b7e5f3d 100644 --- a/pkg/standalone/launcher_linux.go +++ b/pkg/standalone/launcher_linux.go @@ -21,11 +21,14 @@ import ( "log" "os" "os/exec" + + "0xacab.org/leap/bitmask-systray/pkg/config" ) const ( - systemOpenvpnPath = "/usr/sbin/openvpn" - snapOpenvpnPath = "/snap/bin/riseup-vpn.openvpn" + systemOpenvpnPath = "/usr/sbin/openvpn" + snapOpenvpnPath = "/snap/bin/" + config.BinaryName + ".openvpn" + snapBitmaskRootPath = "snap/bin/" + config.BinaryName + ".bitmask-root" ) var bitmaskRootPaths = []string{ @@ -118,7 +121,7 @@ func runBitmaskRoot(arg ...string) error { func bitmaskRootPath() (string, error) { if os.Getenv("SNAP") != "" { - path := "/snap/bin/riseup-vpn.bitmask-root" + path := snapBitmaskRootPath if _, err := os.Stat(path); !os.IsNotExist(err) { return path, nil } |