mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
feat: check automatically if uc can connect via Unix socket when running on cluster machine (#296)
* Check autom if we can connect via Unix socket When there is no config, but a unix socket does exist, connect via the unix socket. Prohibit saving the config if this is the case. Fixes: #148 Use the new CutPrefix to shorten some code. Signed-off-by: Miek Gieben <miek@miek.nl> * remove error checking; it can not be hit Signed-off-by: Miek Gieben <miek@miek.nl> * Extra error text when logged in locally Signed-off-by: Miek Gieben <miek@miek.nl> --------- Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -71,3 +71,8 @@ func Chown(path, username, group string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Exists(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user