mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-25 09:00:26 +00:00
portainer
This commit is contained in:
parent
bc977b4ef6
commit
c16dd1e600
2 changed files with 11 additions and 17 deletions
|
@ -23,18 +23,6 @@ func main() {
|
||||||
fmt.Println("write file error:", err)
|
fmt.Println("write file error:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
fmt.Println("credential is exist, skip it.")
|
|
||||||
cmd := exec.Command("./portainer")
|
|
||||||
cmd.Run()
|
|
||||||
}
|
|
||||||
|
|
||||||
content, err := ioutil.ReadFile(filePath)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println("read file error:", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// call portainer
|
// call portainer
|
||||||
cmd := exec.Command("./portainer", "--admin-password-file", filePath)
|
cmd := exec.Command("./portainer", "--admin-password-file", filePath)
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
|
@ -45,6 +33,12 @@ func main() {
|
||||||
fmt.Println("error running compiled_program:", err)
|
fmt.Println("error running compiled_program:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
fmt.Println("credential is exist, skip it.")
|
||||||
|
cmd := exec.Command("./portainer")
|
||||||
|
cmd.Run()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func generatePassword(length int) string {
|
func generatePassword(length int) string {
|
||||||
|
|
Loading…
Reference in a new issue