Don't run install scripts if disabled; closes pterodactyl/panel#2265

This commit is contained in:
Dane Everitt
2020-08-30 09:41:14 -07:00
parent 9780cf902d
commit c69a0bb107
4 changed files with 29 additions and 8 deletions

View File

@@ -80,6 +80,14 @@ func (s *Server) UpdateDataStructure(data []byte) error {
c.Suspended = v
}
if v, err := jsonparser.GetBoolean(data, "skip_egg_scripts"); err != nil {
if err != jsonparser.KeyPathNotFoundError {
return errors.WithStack(err)
}
} else {
c.SkipEggScripts = v
}
// Environment and Mappings should be treated as a full update at all times, never a
// true patch, otherwise we can't know what we're passing along.
if src.EnvVars != nil && len(src.EnvVars) > 0 {