MCPcopy Index your code
hub / github.com/1Panel-dev/1Panel / GetSystemSSL

Function GetSystemSSL

agent/app/service/website_utils.go:1351–1363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1349}
1350
1351func GetSystemSSL() (bool, uint) {
1352 var sslSetting model.Setting
1353 _ = global.CoreDB.Model(&model.Setting{}).Where("key = ?", "SSL").First(&sslSetting).Error
1354 if sslSetting.Value == "Enable" || sslSetting.Value == "Mux" {
1355 var sslIDSetting model.Setting
1356 _ = global.CoreDB.Model(&model.Setting{}).Where("key = ?", "SSLID").First(&sslIDSetting).Error
1357 idValue, _ := strconv.Atoi(sslIDSetting.Value)
1358 if idValue > 0 {
1359 return true, uint(idValue)
1360 }
1361 }
1362 return false, 0
1363}
1364
1365func UpdateSSLConfig(websiteSSL model.WebsiteSSL) error {
1366 websites, _ := websiteRepo.GetBy(websiteRepo.WithWebsiteSSLID(websiteSSL.ID))

Callers 3

UpdateSSLConfigFunction · 0.85
reloadSystemSSLFunction · 0.85
SyncSystemSSLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected