更新 choose-cn-v2.sh
This commit is contained in:
parent
055d510289
commit
252ddadddb
@ -1,5 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 检查并安装依赖项 jq 和 bc
|
||||||
|
if ! command -v jq &> /dev/null
|
||||||
|
then
|
||||||
|
echo "jq could not be found, installing now..."
|
||||||
|
sudo apt-get update && sudo apt-get install -y jq
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v bc &> /dev/null
|
||||||
|
then
|
||||||
|
echo "bc could not be found, installing now..."
|
||||||
|
sudo apt-get update && sudo apt-get install -y bc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 输出设置 crontab 的命令
|
||||||
|
echo "To run this script every day at 3 AM, add the following line to your crontab:"
|
||||||
|
echo "0 3 * * * /path/to/this/script.sh"
|
||||||
# 测速脚本部分
|
# 测速脚本部分
|
||||||
# 使用 dig 命令查询 DNS 记录并写入 ip.txt
|
# 使用 dig 命令查询 DNS 记录并写入 ip.txt
|
||||||
dig cf.youoffer.net A +short > ip.txt
|
dig cf.youoffer.net A +short > ip.txt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user