Add auto_reboot setting (#5)
Add an auto_reboot setting that determines whether the server will automatically reboot when the inventory changes (e.g., when the config notecard or handler scripts are updated).
This commit is contained in:
@@ -16,6 +16,9 @@ status_update_interval = 1
|
|||||||
# Whether to automatically start the server, or wait for another script to start it.
|
# Whether to automatically start the server, or wait for another script to start it.
|
||||||
auto_start = 1
|
auto_start = 1
|
||||||
|
|
||||||
|
# Whether to automatically reboot the server when the inventory changes.
|
||||||
|
auto_reboot = 0
|
||||||
|
|
||||||
# Whether any hover text will be displayed
|
# Whether any hover text will be displayed
|
||||||
text_enabled = 1
|
text_enabled = 1
|
||||||
|
|
||||||
|
|||||||
11
prim-dns.lsl
11
prim-dns.lsl
@@ -1,5 +1,5 @@
|
|||||||
/* The version of prim-dns. */
|
/* The version of prim-dns. */
|
||||||
string version = "2.3.2";
|
string version = "2.4.0";
|
||||||
|
|
||||||
/* The name of the configuration notecard. */
|
/* The name of the configuration notecard. */
|
||||||
string config_notecard = "prim-dns config";
|
string config_notecard = "prim-dns config";
|
||||||
@@ -37,6 +37,9 @@ integer enable_menus = TRUE;
|
|||||||
/* Whether messages will be shown in chat. */
|
/* Whether messages will be shown in chat. */
|
||||||
integer enable_chat_output = TRUE;
|
integer enable_chat_output = TRUE;
|
||||||
|
|
||||||
|
/* Whether to automatically reboot on inventory change. */
|
||||||
|
integer auto_reboot = FALSE;
|
||||||
|
|
||||||
/* The actual temporary prim URL assigned by llRequestURL */
|
/* The actual temporary prim URL assigned by llRequestURL */
|
||||||
string temporary_url;
|
string temporary_url;
|
||||||
|
|
||||||
@@ -387,7 +390,7 @@ state startup
|
|||||||
|
|
||||||
changed(integer change)
|
changed(integer change)
|
||||||
{
|
{
|
||||||
if (change & CHANGED_INVENTORY)
|
if (auto_reboot && (change & CHANGED_INVENTORY))
|
||||||
{
|
{
|
||||||
state read_configuration;
|
state read_configuration;
|
||||||
}
|
}
|
||||||
@@ -590,7 +593,7 @@ state request_url
|
|||||||
|
|
||||||
changed(integer change)
|
changed(integer change)
|
||||||
{
|
{
|
||||||
if (change & CHANGED_INVENTORY)
|
if (auto_reboot && (change & CHANGED_INVENTORY))
|
||||||
{
|
{
|
||||||
state read_configuration;
|
state read_configuration;
|
||||||
}
|
}
|
||||||
@@ -654,7 +657,7 @@ state main
|
|||||||
changed(integer change)
|
changed(integer change)
|
||||||
{
|
{
|
||||||
/* If the inventory changes (for example, after updating the config notecard), re-initialize. */
|
/* If the inventory changes (for example, after updating the config notecard), re-initialize. */
|
||||||
if (change & CHANGED_INVENTORY)
|
if (auto_reboot && (change & CHANGED_INVENTORY))
|
||||||
{
|
{
|
||||||
state read_configuration;
|
state read_configuration;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user