Commit Graph

7 Commits

Author SHA1 Message Date
Jan Chren ~rindeal fa9a6f7cd2 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>
2024-07-05 13:43:57 -07:00
Rani Hod 1e0d7fd2ef wifi_schedule: fix startup problems
Fixes: e0d7181a6
Closes: #22973
Closes: #22988

1. Make the new `startup()` function in `/usr/bin/wifi_schedule.sh`
   respect the global `enabled` config flag; in particular, make no
   changes to `/etc/config/wireless` when wifi_schedule is disabled.
2. Make the new `/etc/init.d/wifi_schedule` service script executable.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
2024-01-03 08:47:39 -08:00
Nils Koenig e0d7181a6d wifischedule: updated to 1.0.5-1
Fixed _get_wireless_interfaces, thanks to Trekky12
    Check schedule during router startup

Fixes: https://github.com/newkit/wifischedule/pull/9
Maintainer: @newkit
Tested: TP-Link WDR3600 with OpenWRT 23.05

Signed-off-by: Nils Koenig <openwrt@newk.it>
2023-12-01 11:23:13 -08:00
Nils Koenig 36ce3ffbf1 wifischedule: Merged ignore_stations patch from user bedaes https://github.com/newkit/wifischedule/pull/2
Signed-off-by: Nils Koenig <openwrt@newk.it>
2020-11-30 10:05:27 +01:00
Eneas U de Queiroz 2593eabd6b treewide: Capitalize submenus
Fixed a typo in tcpreplay.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2019-07-25 09:35:40 +08:00
dibdot 175e330ef5 wifischedule: remove package arch dependency
Remove package architecture dependency cause wifischedule is "shell script only"

Signed-off-by: Dirk Brenken <dev@brenken.org>
2017-04-20 08:32:02 +02:00
Nils Koenig ad34a2b53c Added wifischedule
Turns WiFi on and off according to a schedule

Signed-off-by: Nils Koenig <openwrt@newk.it>
2016-11-16 02:25:35 +01:00