diff --git a/cmd/root.go b/cmd/root.go index 3d59a5e..1373637 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -81,7 +81,7 @@ func rootCmdRun(*cobra.Command, []string) { panic(err) } - zap.S().Infof("using configuration from path: %s", configPath) + zap.S().Infof("using configuration from path: %s", c.GetPath()) if c.Debug { zap.S().Debugw("running in debug mode") zap.S().Infow("certificate checking is disabled") @@ -264,4 +264,9 @@ func printLogo() { fmt.Println(` \___/\___/___/___/___/___ /______/`) fmt.Println(` /_______/ v` + system.Version) fmt.Println() + fmt.Println(`Website: https://pterodactyl.io`) + fmt.Println(`Source: https://github.com/pterodactyl/wings`) + fmt.Println() + fmt.Println(`Copyright © 2018 - 2020 Dane Everitt & Contributors`) + fmt.Println() } diff --git a/config/config.go b/config/config.go index 526757c..cd8133d 100644 --- a/config/config.go +++ b/config/config.go @@ -237,6 +237,11 @@ func GetJwtAlgorithm() *jwt.HMACSHA { return _jwtAlgo } +// Returns the path for this configuration file. +func (c *Configuration) GetPath() string { + return c.path +} + // Ensures that the Pterodactyl core user exists on the system. This user will be the // owner of all data in the root data directory and is used as the user within containers. // @@ -376,7 +381,7 @@ func (c *Configuration) WriteToDisk() error { c.writeLock.Lock() defer c.writeLock.Unlock() - if err := ioutil.WriteFile(c.path, b, 0644); err != nil { + if err := ioutil.WriteFile(c.GetPath(), b, 0644); err != nil { return err }