Skip to content
Snippets Groups Projects
Unverified Commit f5e3655b authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[bug] fix variable in template

- add some extra debug info for troubleshooting start errors
- fix vendors labels
parent c51106f4
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ donateURL =
name = demolib
applicationName = DemoLibVPN
binaryName = demolibvpn
binaryName = demolib-vpn
auth = sip
authEmptyPass = true
......
......@@ -38,7 +38,7 @@ parts:
mkdir -p $SNAPCRAFT_PART_INSTALL/snap/
mkdir -p $SNAPCRAFT_PRIME/snap/
echo ${version} > $SNAPCRAFT_PRIME/snap/version.txt
QT_SELECT=5 XBUILD=no TARGET={binaryName} ./build.sh
QT_SELECT=5 XBUILD=no TARGET=${binaryName} ./build.sh
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
mv qtbuild/release/${binaryName} $SNAPCRAFT_PART_INSTALL/bin/
override-prime: |
......
......@@ -3,8 +3,8 @@
"providers": [
{
"name": "demolib",
"applicationName": "DemoLib",
"binaryName": "demo-lib",
"applicationName": "DemoLibVPN",
"binaryName": "demolib-vpn",
"auth": "sip",
"authEmptyPass": "true",
"providerURL": "vpnlib.bitmask.net",
......@@ -15,7 +15,7 @@
"apiURL": "https://api.vpnlib.bitmask.net:4430/",
"geolocationAPI": "https://getmyip.vpnlib.bitmask.net/json",
"caCertString": "-----BEGIN CERTIFICATE-----\nMIIBQzCB6aADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAMTDExFQVAgUm9v\ndCBDQTAeFw0yMDA4MDYxOTA3NDRaFw0yNTA4MDYxOTEyNDRaMBcxFTATBgNVBAMT\nDExFQVAgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIG5POr4cAdK\nkTavKpSJr8nW1V7HLpr27qKaShpk1TUy5ipaAlusmavGLxKsPE+i3AMlvf/f6ch3\n1MjAtIf5rYujJjAkMA4GA1UdDwEB/wQEAwICpDASBgNVHRMBAf8ECDAGAQH/AgEB\nMAoGCCqGSM49BAMCA0kAMEYCIQDXj280LNZbSbi0Y2WvtQrJBUw4wdm8qAeOeuH7\n6XiLEwIhAPBRsmst/ujcChsG2t6LpG+p8s4rfIfh8YLo/4qrcc5p\n-----END CERTIFICATE-----",
"timeStamp": "2020-09-08 03:42:39"
"timeStamp": "2020-09-25 13:05:47"
}
]
}
}
\ No newline at end of file
......@@ -40,6 +40,7 @@ var (
var bitmaskRootPaths = []string{
"/usr/sbin/bitmask-root",
"/usr/local/sbin/bitmask-root",
snapBitmaskRootPath,
}
type launcher struct {
......@@ -59,27 +60,33 @@ func (l *launcher) close() error {
func (l *launcher) check() (helpers bool, privilege bool, err error) {
hasHelpers, err := hasHelpers()
if err != nil {
log.Println("Error checking helpers")
return
}
if !hasHelpers {
log.Println("Could not find helpers")
return false, true, nil
}
isRunning, err := isPolkitRunning()
if err != nil {
log.Println("Error checking if polkit is running")
return
}
if !isRunning {
polkitPath := getPolkitPath()
if polkitPath == "" {
log.Println("Cannot find any usable polkit")
return true, false, nil
}
cmd := exec.Command("setsid", polkitPath)
err = cmd.Start()
if err != nil {
log.Println("Cannot launch polkit")
return
}
log.Println("Checking if polkit is running after attempted launch")
isRunning, err = isPolkitRunning()
return true, isRunning, err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment