[video] 新增video线管的内容
This commit is contained in:
@@ -330,6 +330,18 @@ get_ipv4_info() {
|
||||
public_ipv4="$(wget -q -T10 -O- ipinfo.io/ip)"
|
||||
public_ipv6="$(curl -q --max-time 5 -6 https://ifconfig.co/ip)"
|
||||
|
||||
if [[ $city -eq "" ]]; then
|
||||
city="Chengdu"
|
||||
fi
|
||||
|
||||
if [[ $country -eq "" ]]; then
|
||||
country="CN"
|
||||
fi
|
||||
|
||||
if [[ $region -eq "" ]]; then
|
||||
region="Shuangliu"
|
||||
fi
|
||||
|
||||
if [ -z "$public_ipv4" ]; then
|
||||
public_ipv4=" "
|
||||
fi
|
||||
@@ -458,7 +470,7 @@ collect_system_info() {
|
||||
uptime | head -1 | awk -F'load average:' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//'
|
||||
)
|
||||
fi
|
||||
os_info=$(get_host_arch_info)
|
||||
os_info=$(get_host_arch_info | tr "\n" " ")
|
||||
arch=$(uname -m)
|
||||
local l_bit
|
||||
if command_exists "getconf"; then
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
oss_url_prefix="https://oss-s1.107421.xyz"
|
||||
octopus_agent_path=/usr/local/etc/octpus-agent
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
lib_file_list=(wdd-lib-log.sh)
|
||||
# shellcheck disable=SC2068
|
||||
for lib_file in ${lib_file_list[@]}; do
|
||||
# shellcheck disable=SC2154
|
||||
wget "${oss_url_prefix}/${lib_file}" -qO "${octopus_agent_path}/lib/${lib_file}"
|
||||
echo "加载库文件 < ${octopus_agent_path}/lib/${lib_file}"
|
||||
# shellcheck disable=SC1090
|
||||
. "${octopus_agent_path}/lib/${lib_file}"
|
||||
done
|
||||
|
||||
@@ -112,6 +112,7 @@ check_sys() {
|
||||
elif [[ -n $(command -v zypper) ]]; then
|
||||
cmd_install="zypper -y install"
|
||||
cmd_update="zypper ref"
|
||||
# shellcheck disable=SC2034
|
||||
cmd_remove="zypper -y remove"
|
||||
else
|
||||
return 1
|
||||
@@ -128,6 +129,13 @@ check_sys() {
|
||||
|
||||
log "系统包管理工具为 => $cmd_install"
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [[ $is_offline == 1 ]]; then
|
||||
FunctionEnd
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
### 更新程序引索
|
||||
if [[ $software_updated -eq 0 ]]; then
|
||||
log "正在更新软件包管理...可能花费较长时间…………"
|
||||
|
||||
Reference in New Issue
Block a user