1 -- Copyright 2012 Christian Gagneraud <chris@techworks.ie>
2 -- Licensed to the public under the Apache License 2.0.
6 translate("Watchcat allows configuring a periodic reboot when the " ..
7 "Internet connection has been lost for a certain period of time."
10 s = m:section(TypedSection, "watchcat")
14 mode = s:option(ListValue, "mode",
15 translate("Operating mode"))
16 mode.default = "allways"
17 mode:value("ping", "Reboot on internet connection lost")
18 mode:value("allways", "Periodic reboot")
20 forcedelay = s:option(Value, "forcedelay",
21 translate("Forced reboot delay"),
22 translate("When rebooting the system, the watchcat will trigger a soft reboot. " ..
23 "Entering a non zero value here will trigger a delayed hard reboot " ..
24 "if the soft reboot fails. Enter a number of seconds to enable, " ..
26 forcedelay.datatype = "uinteger"
27 forcedelay.default = "0"
29 period = s:option(Value, "period",
31 translate("In periodic mode, it defines the reboot period. " ..
32 "In internet mode, it defines the longest period of " ..
33 "time without internet access before a reboot is engaged." ..
34 "Default unit is seconds, you can use the " ..
35 "suffix 'm' for minutes, 'h' for hours or 'd' " ..
38 pinghost = s:option(Value, "pinghosts",
39 translate("Ping host"),
40 translate("Host address to ping"))
41 pinghost.datatype = "host"
42 pinghost.default = "8.8.8.8"
43 pinghost:depends({mode="ping"})
45 pingperiod = s:option(Value, "pingperiod",
46 translate("Ping period"),
47 translate("How often to check internet connection. " ..
48 "Default unit is seconds, you can you use the " ..
49 "suffix 'm' for minutes, 'h' for hours or 'd' " ..
51 pingperiod:depends({mode="ping"})