RemoteAdmin:admin shutdown

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Optional Parameters: add missing parameters for admin_shutdown command)
 
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
'''admin_shutdown''' remotely allows to shutdown the simulator. Agents in the Region recieve a warning. All regions in the instance will be shut down. When using the optional ''shutdown'' and ''milliseconds'' parameter the shut down is delayed by the specified miliseconds.
+
'''admin_shutdown''' remotely allows to shutdown the simulator. Agents in the Region recieve a warning. All regions in the instance will be shut down. When using the optional ''shutdown'' and ''milliseconds'' parameter the shut down is delayed by the specified miliseconds.
  
 
=== Enabling admin_shutdown ===
 
=== Enabling admin_shutdown ===
Line 9: Line 9:
 
== Parameters ==
 
== Parameters ==
 
=== Required Parameters ===
 
=== Required Parameters ===
No parameters are required
+
No parameters are required.
 
+
  
 
=== Optional Parameters ===
 
=== Optional Parameters ===
Line 25: Line 24:
 
|-
 
|-
 
| ''milliseconds''
 
| ''milliseconds''
| miliseconds till region shuts down.
+
| milliseconds till region shuts down.
 
| "delayed"
 
| "delayed"
 +
|-
 +
| ''noticetype''
 +
| send a notification to users in region
 +
| "dialog"
 +
|-
 +
| ''noticetype''
 +
| send a general alert
 +
| "none"
 
|}
 
|}
 
  
 
== Returned Parameters ==
 
== Returned Parameters ==
Line 63: Line 69:
 
== Example ==
 
== Example ==
 
=== PHP ===
 
=== PHP ===
 +
This example needs the RemoteAdmin PHP Class file available [[RemoteAdmin:RemoteAdmin_Class|here]].
 +
 
<source lang="php">
 
<source lang="php">
 
<?php
 
<?php
Line 73: Line 81:
  
 
// Invoke admin_create_user (multiple parameters)
 
// Invoke admin_create_user (multiple parameters)
$parameters = array('shutdown' => 'delayed', 'milliseconds' => 60000);
+
$parameters = array('region_id'=> $region_id, 'shutdown' => 'delayed', 'milliseconds' => 60000);
$myRemoteAdmin->SendCommand('admin_close_region', $parameters);
+
$myRemoteAdmin->SendCommand('admin_shutdown', $parameters);
 
?>
 
?>
 
</source>
 
</source>
  
[[RemoteAdmin]]
+
 
[[RemoteAdmin:Commands]]
+
[[Category:RemoteAdmin]]
 +
[[Category:RemoteAdmin Commands]]

Latest revision as of 21:32, 31 July 2024

admin_shutdown remotely allows to shutdown the simulator. Agents in the Region recieve a warning. All regions in the instance will be shut down. When using the optional shutdown and milliseconds parameter the shut down is delayed by the specified miliseconds.

Contents

[edit] Enabling admin_shutdown

If not all functions are enabled, use admin_shutdown to enable the function in the [RemoteAdmin] section

enabled_methods = admin_shutdown,...

[edit] Parameters

[edit] Required Parameters

No parameters are required.

[edit] Optional Parameters

These parameters are optional and do not need to be set

parameter Description Values
shutdown use shutdown together with milliseconds to trigger a delayed shutdown. "delayed"
milliseconds milliseconds till region shuts down. "delayed"
noticetype send a notification to users in region "dialog"
noticetype send a general alert "none"

[edit] Returned Parameters

[edit] Returned Parameters

These parameters are returned by Remote Admin

parameter Description Values
success true when successfull true
accepted true when successfull true, false
error error message when not successfull


[edit] Error messages

[edit] Notes

  • Returned Parameter success only implemeted for true, patch in work by Michelle Argus to implement success fully


[edit] Example

[edit] PHP

This example needs the RemoteAdmin PHP Class file available here.

<?php
 
// Including the RemoteAdmin PHP class.
include('RemoteAdmin.php');
 
// Instantiate the class with parameters identical to the Python example above
$myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret');
 
// Invoke admin_create_user (multiple parameters)
$parameters = array('region_id'=> $region_id, 'shutdown' => 'delayed', 'milliseconds' => 60000);
$myRemoteAdmin->SendCommand('admin_shutdown', $parameters);
?>
Personal tools
General
About This Wiki