mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-17 05:53:03 +08:00
update
This commit is contained in:
commit
1741072933
93 files changed
+6216
No files matched your search
@@ -0,0 +1,43 @@
|
||||
--- a/watchcat/files/watchcat.init
|
||||
+++ b/watchcat/files/watchcat.init
|
||||
@@ -32,6 +32,8 @@ time_to_seconds() {
|
||||
|
||||
config_watchcat() {
|
||||
# Read config
|
||||
+ config_get_bool enabled "$1" enabled 0
|
||||
+ [ "$enabled" = "1" ] || { echo "Watcat $1 not enabled."; return 1; }
|
||||
config_get period "$1" period "120"
|
||||
config_get mode "$1" mode "ping_reboot"
|
||||
config_get pinghosts "$1" pinghosts "8.8.8.8"
|
||||
|
||||
--- a/watchcat/files/watchcat.config
|
||||
+++ b/watchcat/files/watchcat.config
|
||||
@@ -1,5 +1,5 @@
|
||||
config watchcat
|
||||
option period '6h'
|
||||
option mode 'ping_reboot'
|
||||
- option pinghosts '8.8.8.8'
|
||||
+ option pinghosts '223.5.5.5'
|
||||
option forcedelay '30'
|
||||
|
||||
--- a/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js
|
||||
+++ b/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js
|
||||
@@ -18,6 +18,9 @@ return view.extend({
|
||||
|
||||
s.tab('general', _('General Settings'));
|
||||
|
||||
+ o = s.taboption('general', form.Flag, 'enabled', _('Enabled'));
|
||||
+ o.rmempty = false;
|
||||
+
|
||||
o = s.taboption('general', form.ListValue, 'mode',
|
||||
_('Mode'),
|
||||
_("Ping Reboot: Reboot this device if a ping to a specified host fails for a specified duration of time. <br /> \
|
||||
@@ -51,7 +51,7 @@ return view.extend({
|
||||
|
||||
o = s.taboption('general', form.DynamicList, 'pinghosts', _('Hosts To Check'), _(`IP addresses or hostnames to ping.`));
|
||||
o.datatype = 'host';
|
||||
- o.default = ['8.8.8.8', '1.1.1.1'];
|
||||
+ o.default = ['223.5.5.5', '8.8.8.8', '1.1.1.1'];
|
||||
o.depends({ mode: "ping_reboot" });
|
||||
o.depends({ mode: "restart_iface" });
|
||||
o.depends({ mode: "run_script" });
|
||||
Reference in new issue
Block a user