Add reinstall abilities and cleanup process for new servers
This commit is contained in:
parent
3fe5d162f5
commit
8dc24471ae
9 changed files with 91 additions and 3 deletions
|
@ -322,6 +322,30 @@ class ServersController extends Controller
|
|||
return redirect()->route('admin.servers.view.manage', $id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reinstalls the server with the currently assigned pack and service.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function reinstallServer(Request $request, $id)
|
||||
{
|
||||
$repo = new ServerRepository;
|
||||
try {
|
||||
$repo->reinstall($id);
|
||||
|
||||
Alert::success('Server successfully marked for reinstallation.')->flash();
|
||||
} catch (DisplayException $ex) {
|
||||
Alert::danger($ex->getMessage())->flash();
|
||||
} catch (\Exception $ex) {
|
||||
Log::error($ex);
|
||||
Alert::danger('An unhandled exception occured while attemping to perform this reinstallation. This error has been logged.')->flash();
|
||||
}
|
||||
|
||||
return redirect()->route('admin.servers.view.manage', $id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup a server to have a container rebuild.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue