Skip to content
Snippets Groups Projects
Unverified Commit deb6969f authored by Massimiliano Adamo's avatar Massimiliano Adamo
Browse files

fix comments

parent d8d4d28a
No related branches found
No related tags found
No related merge requests found
Pipeline #29737 passed
...@@ -63,7 +63,7 @@ var ( ...@@ -63,7 +63,7 @@ var (
httpClient = &http.Client{Timeout: 10 * time.Second} httpClient = &http.Client{Timeout: 10 * time.Second}
) )
// app clean and exit // clean-up and exit
func appExit(status int) { func appExit(status int) {
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
certTmpDir = "C:\\tmp\\acme-downloader\\" certTmpDir = "C:\\tmp\\acme-downloader\\"
...@@ -223,7 +223,7 @@ func checkPrivkey(privkey string, pubkey string, fail bool) bool { ...@@ -223,7 +223,7 @@ func checkPrivkey(privkey string, pubkey string, fail bool) bool {
return true return true
} }
// get redis key // get Redis key
func GetRedisKey(redisurl string, redistoken string) string { func GetRedisKey(redisurl string, redistoken string) string {
client := &http.Client{} client := &http.Client{}
req, err := http.NewRequest("GET", redisurl, nil) req, err := http.NewRequest("GET", redisurl, nil)
...@@ -307,7 +307,7 @@ func moveFile(source string, destination string, groupid int, filemode os.FileMo ...@@ -307,7 +307,7 @@ func moveFile(source string, destination string, groupid int, filemode os.FileMo
fmt.Printf("%v installed: %v\n", infoMsg, destination) fmt.Printf("%v installed: %v\n", infoMsg, destination)
} }
// ReadOSRelease from /etc/os-release // Read OS release from /etc/os-release
func ReadOSRelease(configfile string) map[string]string { func ReadOSRelease(configfile string) map[string]string {
ConfigParams := make(map[string]string) ConfigParams := make(map[string]string)
cfg, err := ini.Load(configfile) cfg, err := ini.Load(configfile)
...@@ -423,7 +423,7 @@ Options: ...@@ -423,7 +423,7 @@ Options:
appExit(0) appExit(0)
} }
// chekc upstream version // check upstream version
metadataBase := "https://artifactory.software.geant.org/artifactory/api/storage/acme-downloader/acme-downloader" metadataBase := "https://artifactory.software.geant.org/artifactory/api/storage/acme-downloader/acme-downloader"
metadataURL := fmt.Sprintf("%v_%v_%v?properties=version", metadataBase, runtime.GOOS, runtime.GOARCH) metadataURL := fmt.Sprintf("%v_%v_%v?properties=version", metadataBase, runtime.GOOS, runtime.GOARCH)
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
...@@ -563,8 +563,8 @@ Options: ...@@ -563,8 +563,8 @@ Options:
moveFile(tmpCaDestination, caDestination, GroupID, 0644, 0755) moveFile(tmpCaDestination, caDestination, GroupID, 0644, 0755)
moveFile(tmpKeyDestination, keyDestination, GroupID, 0640, 0750) moveFile(tmpKeyDestination, keyDestination, GroupID, 0640, 0750)
// Exit 64: it means that the certificate was replaced and the // Exit 64: if we are here it means that the certificate was replaced
// application can be reloaded to make use of the new certificate // and the application can be reloaded to make use of the new certificate
appExit(64) appExit(64)
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment