Use more easily configurable timezone, remove /etc/timezone mounts from containers; closes pterodactyl/panel#2513

If this does not completely solve the issue in containers then we need to evaluate the image being used to determine what changes need to happen to the image itself to support the timezone.

ref pterodactyl/panel#2239
ref pterodactyl/panel#2329
ref pterodactyl/panel#2389
This commit is contained in:
Dane Everitt
2020-10-17 11:35:20 -07:00
parent 7e8033d96c
commit 80387bc294
5 changed files with 75 additions and 44 deletions

View File

@@ -132,6 +132,13 @@ func rootCmdRun(*cobra.Command, []string) {
config.Set(c)
config.SetDebugViaFlag(debug)
if err := c.System.ConfigureTimezone(); err != nil {
log.WithField("error", err).Fatal("failed to detect system timezone or use supplied configuration value")
return
}
log.WithField("timezone", c.System.Timezone).Info("configured wings with system timezone")
if err := c.System.ConfigureDirectories(); err != nil {
log.WithField("error", err).Fatal("failed to configure system directories for pterodactyl")
return