fix perms
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
85a90658b9
commit
d519a4d0b2
|
@ -3,6 +3,7 @@ package servers
|
||||||
import (
|
import (
|
||||||
"cwtch.im/cwtch/event"
|
"cwtch.im/cwtch/event"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
"git.openprivacy.ca/cwtch.im/libcwtch-go/constants"
|
"git.openprivacy.ca/cwtch.im/libcwtch-go/constants"
|
||||||
"git.openprivacy.ca/cwtch.im/server"
|
"git.openprivacy.ca/cwtch.im/server"
|
||||||
"git.openprivacy.ca/openprivacy/connectivity"
|
"git.openprivacy.ca/openprivacy/connectivity"
|
||||||
|
@ -46,7 +47,10 @@ func InitServers(acn connectivity.ACN, appdir string) {
|
||||||
defer lock.Unlock()
|
defer lock.Unlock()
|
||||||
if appServers == nil {
|
if appServers == nil {
|
||||||
serversDir := path.Join(appdir, "servers")
|
serversDir := path.Join(appdir, "servers")
|
||||||
os.MkdirAll(serversDir, 700)
|
err := os.MkdirAll(serversDir, 0700)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Could not init servers directory: %s", err)
|
||||||
|
}
|
||||||
appServers = server.NewServers(acn, serversDir)
|
appServers = server.NewServers(acn, serversDir)
|
||||||
appServers.LoadServers(constants.DefactoPasswordForUnencryptedProfiles)
|
appServers.LoadServers(constants.DefactoPasswordForUnencryptedProfiles)
|
||||||
}
|
}
|
||||||
|
@ -134,4 +138,4 @@ func (si *ServerInfo) EnrichEvent(e *event.Event) {
|
||||||
} else {
|
} else {
|
||||||
e.Data["Running"] = "false"
|
e.Data["Running"] = "false"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue