mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
feat: 修改 user-info 指令的输出 (#2103)
This commit is contained in:
parent
3adb200585
commit
d1e7b36243
@ -26,6 +26,7 @@ var userinfoCmd = &cobra.Command{
|
|||||||
ssl := getSettingByKey(db, "SSL")
|
ssl := getSettingByKey(db, "SSL")
|
||||||
entrance := getSettingByKey(db, "SecurityEntrance")
|
entrance := getSettingByKey(db, "SecurityEntrance")
|
||||||
encryptSetting := getSettingByKey(db, "EncryptKey")
|
encryptSetting := getSettingByKey(db, "EncryptKey")
|
||||||
|
address := getSettingByKey(db, "SystemIP")
|
||||||
|
|
||||||
p := ""
|
p := ""
|
||||||
if len(encryptSetting) == 16 {
|
if len(encryptSetting) == 16 {
|
||||||
@ -35,11 +36,17 @@ var userinfoCmd = &cobra.Command{
|
|||||||
p = password
|
p = password
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("username: %s\n", user)
|
protocol := "http"
|
||||||
fmt.Printf("password: %s\n", p)
|
if ssl == "enable" {
|
||||||
fmt.Printf("port: %s\n", port)
|
protocol = "https"
|
||||||
fmt.Printf("ssl: %s\n", ssl)
|
}
|
||||||
fmt.Printf("entrance: %s\n", entrance)
|
if address == "" {
|
||||||
|
address = "$LOCAL_IP"
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Printf("面板地址: %s://%s:%s/%s \n", protocol, address, port, entrance)
|
||||||
|
fmt.Printf("用户名称: %s\n", user)
|
||||||
|
fmt.Printf("用户密码: %s\n", p)
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user