Пример #1
0
func getConfig() (*textsecure.Config, error) {
	configFile = filepath.Join(configDir, "config.yml")
	cf := configFile
	if isPhone {
		configDir = filepath.Join("/opt/click.ubuntu.com", appName, "current")
		if !exists(configFile) {
			cf = filepath.Join(configDir, "config.yml")
		}
	}
	var err error
	if exists(cf) {
		config, err = textsecure.ReadConfig(cf)
	} else {
		config = &textsecure.Config{}
	}
	config.StorageDir = storageDir
	config.UserAgent = fmt.Sprintf("TextSecure %s for Ubuntu Phone", appVersion)
	config.UnencryptedStorage = true
	config.LogLevel = "debug"
	config.AlwaysTrustPeerID = true
	rootCA := filepath.Join(configDir, "rootCA.crt")
	if exists(rootCA) {
		config.RootCA = rootCA
	}
	return config, err
}
Пример #2
0
func getConfig() (*textsecure.Config, error) {
	return textsecure.ReadConfig(configDir + "/config.yml")
}
Пример #3
0
func getConfig() (*textsecure.Config, error) {
	return textsecure.ReadConfig(".config/config.yml")
}
Пример #4
0
// get Config file, pass to the ts library
func getConfig() (*ts.Config, error) {
	return ts.ReadConfig(".config/config.yml")
}