summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2018-09-06 15:48:34 +0200
committerRuben Pollan <meskio@sindominio.net>2018-09-06 16:07:57 +0200
commit9961cccc89c48f9ce653c75fabbfc829900b82fe (patch)
treef15538702b747ed315eb5874347d037e8ddbdb72
parenta56b1ce6018a88ee7b3c146ff8d124c56aaed974 (diff)
[bug] pass bitmask root path from snap
-rw-r--r--standalone/launcher_linux.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/standalone/launcher_linux.go b/standalone/launcher_linux.go
index 4046fa5..a434ecd 100644
--- a/standalone/launcher_linux.go
+++ b/standalone/launcher_linux.go
@@ -31,7 +31,6 @@ const (
var bitmaskRootPaths = []string{
"/usr/sbin/bitmask-root",
"/usr/local/sbin/bitmask-root",
- "/snap/bin/riseup-vpn.bitmask-root",
}
type launcher struct {
@@ -113,6 +112,12 @@ func runBitmaskRoot(arg ...string) error {
}
func bitmaskRootPath() (string, error) {
+ if os.Getenv("SNAP") != "" {
+ path := "/snap/bin/riseup-vpn.bitmask-root"
+ if _, err := os.Stat(path); !os.IsNotExist(err) {
+ return path, nil
+ }
+ }
for _, path := range bitmaskRootPaths {
if _, err := os.Stat(path); !os.IsNotExist(err) {
return path, nil