1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2024-08-01 23:33:39 +08:00 committed by GitHub
commit b0cb012320
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -125,6 +125,7 @@ if [ "$(uci -q get omr-bypass.free)" = "" ]; then
add_list omr-bypass.free.url='freebox.fr'
add_list omr-bypass.free.url='oqee.tv'
add_list omr-bypass.free.url='oqee.net'
add_list omr-bypass.free.url='proxad.net'
commit omr-bypass
EOF
fi

View file

@ -79,6 +79,9 @@ _get_json() {
else
result=`curl --max-time 10 -s -k -H "accept: application/json" -H "Authorization: Bearer $token" https://[$server]:$serverport/$route`
fi
if [ "$(echo $result | grep 'Could not validate credentials')" ]; then
result=''
fi
echo $result
} || {
echo ''
@ -2264,6 +2267,8 @@ _config_service() {
[ -z "$vps_config" ] && vps_config=$(_get_json "config")
[ -z "$vps_config" ] && return
kernel="$(echo "$vps_config" | jsonfilter -q -e '@.vps.kernel')"
[ -z "$kernel" ] && return
user_permission="$(echo "$vps_config" | jsonfilter -q -e '@.user.permission')"
if [ "$user_permission" != "ro" ]; then