mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
parentalcontrol: only check urlbundle enable to download bundle
This commit is contained in:
parent
4110c22f64
commit
db089a3920
1 changed files with 9 additions and 25 deletions
|
|
@ -257,36 +257,20 @@ handle_filter_for_bundles() {
|
|||
return 0
|
||||
fi
|
||||
|
||||
if [ "$name" = "$2" ]; then
|
||||
handle_download_url "$download_url" "$name"
|
||||
local exit_status=$?
|
||||
if [ "$exit_status" -eq 1 ]; then
|
||||
uci -q set "parentalcontrol.${cfg}.status"="Error"
|
||||
else
|
||||
uci -q set "parentalcontrol.${cfg}.status"=""
|
||||
fi
|
||||
|
||||
uci commit parentalcontrol
|
||||
handle_download_url "$download_url" "$name"
|
||||
local exit_status=$?
|
||||
if [ "$exit_status" -eq 1 ]; then
|
||||
uci -q set "parentalcontrol.${cfg}.status"="Error"
|
||||
else
|
||||
uci -q set "parentalcontrol.${cfg}.status"=""
|
||||
fi
|
||||
|
||||
uci commit parentalcontrol
|
||||
}
|
||||
|
||||
handle_bundle_from_profile() {
|
||||
local bundle_name="$1"
|
||||
|
||||
config_foreach check_bundle_exists urlbundle "$bundle_name"
|
||||
}
|
||||
|
||||
handle_profile() {
|
||||
config_get_bool enable "$1" enable 0
|
||||
[ "$enable" -ne 1 ] && return
|
||||
|
||||
config_list_foreach "$1" profile_urlbundle handle_bundle_from_profile
|
||||
}
|
||||
|
||||
config_foreach handle_profile profile_urlfilter
|
||||
config_foreach check_bundle_exists urlbundle
|
||||
}
|
||||
|
||||
|
||||
# Open file descriptor 200 for locking
|
||||
exec 200>"$LOCKFILE"
|
||||
# Try to acquire an exclusive lock; exit if another instance is running
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue