Files
abra/pkg/server/server.go
decentral1se 37c0257851
Some checks failed
continuous-integration/drone/push Build is failing
WIP: feat: translation support
See #483
2025-08-23 17:03:53 +02:00

29 lines
553 B
Go

package server
import (
"os"
"path"
"coopcloud.tech/abra/pkg/config"
"coopcloud.tech/abra/pkg/log"
"coopcloud.tech/abra/pkg/i18n"
)
// CreateServerDir creates a server directory under ~/.abra.
func CreateServerDir(serverName string) error {
serverPath := path.Join(config.ABRA_DIR, "servers", serverName)
if err := os.Mkdir(serverPath, 0700); err != nil {
if !os.IsExist(err) {
return err
}
log.Debug(i18n.G("%s already exists", serverPath))
return nil
}
log.Debug(i18n.G("successfully created %s", serverPath))
return nil
}