-
Notifications
You must be signed in to change notification settings - Fork 3.9k
watchcat: add per-instance 'enabled' option (default 1) #30234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,9 @@ time_to_seconds() { | |
|
|
||
| config_watchcat() { | ||
| # Read config | ||
| config_get_bool enabled "$1" enabled 1 | ||
| [ "$enabled" -eq 1 ] || return 0 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The early return itself is correct: Pre-existing, not introduced here, but adjacent enough to be worth mentioning while this function is open: Generated by Claude Code |
||
|
|
||
| config_get period "$1" period "120" | ||
| config_get mode "$1" mode "ping_reboot" | ||
| config_get pinghosts "$1" pinghosts "8.8.8.8" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit (optional, cosmetic): every other default in this function is quoted (
config_get_bool unlockbands "$1" unlockbands "0",config_get period "$1" period "120"); this one is bare. The option name and theconfig_get_bool ... 1fallback otherwise match the in-tree convention (e.g. uhttpd.init:117, trelay.init:7), so this is purely about matching the surrounding lines.Generated by Claude Code