wifischedule: completely overhaul the script
authorJan Chren ~rindeal <dev.rindeal@gmail.com>
Thu, 4 Jul 2024 08:58:40 +0000 (08:58 +0000)
committerRosen Penev <rosenp@gmail.com>
Fri, 5 Jul 2024 20:43:57 +0000 (13:43 -0700)
commitfa9a6f7cd2057af847023cf21a0ab247c367e7b0
treeeff839247331f0696674cea2136f27b12edd1dc8
parent25c197c9ea1cb873f0e0cd20733d2cef9f9e46ee
wifischedule: completely overhaul the script

Squashed using these commits:

 - wifischedule: use `service` instead of direct path
 - wifischedule: use `sort -u` instead of `uniq`
 - wifischedule: restart cron only at the end of batch instead of after every change
 - wifischedule: remove `[[` bash-isms
 - wifischedule: trim trailing ws
 - wifischedule: reduce `if` blocks
 - wifischedule: quote variables and remove some more bash-isms
 - wifischedule: simplify _get_uci_value`
 - wifischedule: don't exit whole script just because `uci get somekey` fails somewhere
 - wifischedule: revamp `_should_enable_wifi()`
 - wifischedule: revamp `_format_daysofweek_list()`
 - wifischedule: revamp `_enable_wifi_schedule()`
 - wifischedule: minor refactoring
 - wifischedule: mega revamp
 - wifischedule: fixes
 - wifischedule: touch-ups
 - wifischedule: use only `awk` in `_cfg_list_entries()` to filter `uci`
 - wifischedule: improve code docs
 - wifischedule: inline `_crontab_format_dow_field()`
 - wifischedule: refactor `_crontab_append_line()`
 - wifischedule: add `_uci_bool()` and refactor `_arith_bool()`
 - wifischedule: rename some functions
 - wifischedule: refactor using shellcheck
 - wifischedule: refactor `_wifi_get_interfaces()`
 - wifischedule: refactor `_wifi_get_devices()`
 - wifischedule: shellcheck fixes
 - wifischedule: use logger instead of a logfile
 - wifischedule: refactor global consts
 - wifischedule: introduce main() func
 - wifischedule: bump version

Signed-off-by: Jan Chren ~rindeal <dev.rindeal@gmail.com>
net/wifischedule/Makefile
net/wifischedule/net/usr/bin/wifi_schedule.sh