RemoteAdmin:admin restart
From OpenSimulator
(Difference between revisions)
(Created page with "'''admin_restart''' remotely allows to triggers a region to restart. === Enabling admin_restart === If not all functions are enabled, use admin_restart to enable the function ...") |
JeffKelley (Talk | contribs) m (→PHP: Fixed broken Google Code link, replacing with internal page) |
||
(9 intermediate revisions by 6 users not shown) | |||
Line 17: | Line 17: | ||
! Values | ! Values | ||
|- | |- | ||
− | | '' | + | | ''region_id'' |
| region uuid of the region | | region uuid of the region | ||
| | | | ||
|} | |} | ||
− | |||
=== Optional Parameters === | === Optional Parameters === | ||
Line 37: | Line 36: | ||
! Description | ! Description | ||
! Values | ! Values | ||
+ | |- | ||
+ | | ''accepted'' | ||
+ | | true when accepted | ||
+ | | true, false | ||
|- | |- | ||
| ''success'' | | ''success'' | ||
Line 50: | Line 53: | ||
|true, false | |true, false | ||
|} | |} | ||
− | |||
=== Error messages === | === Error messages === | ||
When an error occures the following error value are returned | When an error occures the following error value are returned | ||
− | *region not found | + | * region not found |
== Notes == | == Notes == | ||
− | *''accepted'' is an optional returned parameter, probably used prior to ''success'' | + | * ''accepted'' is an optional returned parameter, probably used prior to ''success'' |
== 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 77: | ||
$myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret'); | $myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret'); | ||
− | // Invoke | + | // Invoke admin_restart (multiple parameters) |
− | $parameters = array(' | + | $parameters = array('region_id' => '000000-0000-0000-0000-00000000'); |
$myRemoteAdmin->SendCommand('admin_restart', $parameters); | $myRemoteAdmin->SendCommand('admin_restart', $parameters); | ||
?> | ?> | ||
</source> | </source> | ||
− | [[Category: | + | |
+ | [[Category:RemoteAdmin]] | ||
+ | [[Category:RemoteAdmin Commands]] |
Latest revision as of 11:37, 16 March 2021
admin_restart remotely allows to triggers a region to restart.
Contents |
[edit] Enabling admin_restart
If not all functions are enabled, use admin_restart to enable the function in the [RemoteAdmin] section
enabled_methods = admin_restart,...
[edit] Parameters
[edit] Required Parameters
These parameters are required
parameter | Description | Values |
---|---|---|
region_id | region uuid of the region |
[edit] Optional Parameters
No optional parameters
[edit] Returned Parameters
[edit] Returned Parameters
These parameters are returned by Remote Admin
parameter | Description | Values |
---|---|---|
accepted | true when accepted | true, false |
success | true when successfull | true, false |
error | error message when not successfull | |
rebooting | true when region is restarting | true, false |
[edit] Error messages
When an error occures the following error value are returned
- region not found
[edit] Notes
- accepted is an optional returned parameter, probably used prior to success
[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_restart (multiple parameters) $parameters = array('region_id' => '000000-0000-0000-0000-00000000'); $myRemoteAdmin->SendCommand('admin_restart', $parameters); ?>