server(install): update installation status request
The new request includes a `reinstall` option to denote whether the installation failed for the first time, or during a reinstall. ref https://github.com/pterodactyl/panel/issues/1994
This commit is contained in:
@@ -153,9 +153,15 @@ func postServerSync(c *gin.Context) {
|
||||
func postServerInstall(c *gin.Context) {
|
||||
s := ExtractServer(c)
|
||||
|
||||
go func(serv *server.Server) {
|
||||
if err := serv.Install(true); err != nil {
|
||||
serv.Log().WithField("error", err).Error("failed to execute server installation process")
|
||||
go func(s *server.Server) {
|
||||
s.Log().Info("syncing server state with remote source before executing installation process")
|
||||
if err := s.Sync(); err != nil {
|
||||
s.Log().WithField("error", err).Error("failed to sync server state with Panel")
|
||||
return
|
||||
}
|
||||
|
||||
if err := s.Install(); err != nil {
|
||||
s.Log().WithField("error", err).Error("failed to execute server installation process")
|
||||
}
|
||||
}(s)
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ func postCreateServer(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if err := i.Server().Install(false); err != nil {
|
||||
if err := i.Server().Install(); err != nil {
|
||||
log.WithFields(log.Fields{"server": i.Server().ID(), "error": err}).Error("failed to run install process for server")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user