Don't run install scripts if disabled; closes pterodactyl/panel#2265
This commit is contained in:
@@ -35,10 +35,17 @@ func (s *Server) Install(sync bool) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Send the start event so the Panel can automatically update.
|
||||
s.Events().Publish(InstallStartedEvent, "")
|
||||
var err error
|
||||
if !s.Config().SkipEggScripts {
|
||||
// Send the start event so the Panel can automatically update. We don't send this unless the process
|
||||
// is actually going to run, otherwise all sorts of weird rapid UI behavior happens since there isn't
|
||||
// an actual install process being executed.
|
||||
s.Events().Publish(InstallStartedEvent, "")
|
||||
|
||||
err := s.internalInstall()
|
||||
err = s.internalInstall()
|
||||
} else {
|
||||
s.Log().Info("server configured to skip running installation scripts for this egg, not executing process")
|
||||
}
|
||||
|
||||
s.Log().Debug("notifying panel of server install state")
|
||||
if serr := s.SyncInstallState(err == nil); serr != nil {
|
||||
|
||||
Reference in New Issue
Block a user