mirror of
https://github.com/coolsnowwolf/packages
synced 2025-01-08 11:17:36 +08:00
rclone: fix init script on CIDR format ipaddr
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
This commit is contained in:
parent
95a184f5a0
commit
4082739d84
@ -47,12 +47,13 @@ start_service() {
|
||||
config_get proxy_addr proxy proxy_addr
|
||||
|
||||
if [ "${addr_type}" = "local" ]; then
|
||||
addr="$(uci get network.loopback.ipaddr)"
|
||||
addr="$(uci get network.loopback.ipaddr | cut -d' ' -f1)"
|
||||
elif [ "${addr_type}" = "lan" ]; then
|
||||
addr="$(uci get network.lan.ipaddr)"
|
||||
addr="$(uci get network.lan.ipaddr | cut -d' ' -f1)"
|
||||
else
|
||||
addr=""
|
||||
fi
|
||||
addr="${addr%/*}"
|
||||
|
||||
local config_dir="${config_path%/*}"
|
||||
[ -d "$config_dir" ] || mkdir -p "$config_dir"
|
||||
|
Loading…
Reference in New Issue
Block a user