Automatically write a logrotate file to the disk when wings boots if directory exists; closes pterodactyl/panel#2312

This commit is contained in:
Dane Everitt
2020-09-03 20:13:51 -07:00
parent b6008108ac
commit e09cc3d2dd
4 changed files with 66 additions and 3 deletions

View File

@@ -133,8 +133,12 @@ func rootCmdRun(*cobra.Command, []string) {
config.SetDebugViaFlag(debug)
if err := c.System.ConfigureDirectories(); err != nil {
log.WithError(err).Fatal("failed to configure system directories for pterodactyl")
os.Exit(1)
log.WithField("error", err).Fatal("failed to configure system directories for pterodactyl")
return
}
if err := c.System.EnableLogRotation(); err != nil {
log.WithField("error", err).Fatal("failed to configure log rotation on the system")
return
}