aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs36
1 files changed, 30 insertions, 6 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 9e72a98..437d150 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -258,10 +258,25 @@ namespace OpenSim.ApplicationPlugins.RemoteController
258 { 258 {
259 m_log.Info("[RADMIN]: Request to restart Region."); 259 m_log.Info("[RADMIN]: Request to restart Region.");
260 260
261 CheckRegionParams(requestData, responseData);
262
263 Scene rebootedScene = null; 261 Scene rebootedScene = null;
264 GetSceneFromRegionParams(requestData, responseData, out rebootedScene); 262 bool restartAll = false;
263
264 IConfig startupConfig = m_configSource.Configs["Startup"];
265 if (startupConfig != null)
266 {
267 if (startupConfig.GetBoolean("InworldRestartShutsDown", false))
268 {
269 rebootedScene = m_application.SceneManager.CurrentOrFirstScene;
270 restartAll = true;
271 }
272 }
273
274 if (rebootedScene == null)
275 {
276 CheckRegionParams(requestData, responseData);
277
278 GetSceneFromRegionParams(requestData, responseData, out rebootedScene);
279 }
265 280
266 IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>(); 281 IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>();
267 282
@@ -324,11 +339,20 @@ namespace OpenSim.ApplicationPlugins.RemoteController
324 notice = false; 339 notice = false;
325 } 340 }
326 341
327 if (restartModule != null) 342 List<Scene> restartList;
343
344 if (restartAll)
345 restartList = m_application.SceneManager.Scenes;
346 else
347 restartList = new List<Scene>() { rebootedScene };
348
349 foreach (Scene s in m_application.SceneManager.Scenes)
328 { 350 {
329 restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice); 351 restartModule = s.RequestModuleInterface<IRestartModule>();
330 responseData["success"] = true; 352 if (restartModule != null)
353 restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice);
331 } 354 }
355 responseData["success"] = true;
332 } 356 }
333 catch (Exception e) 357 catch (Exception e)
334 { 358 {