🌱More settings

This commit is contained in:
Leon 2021-07-14 15:18:52 +08:00
parent b2395cdf5a
commit c9db90deaf

View File

@ -41,6 +41,13 @@ fi
# 授权
chmod 755 $extra_shell_path
# extra.sh 预设仓库及默认拉取仓库设置
echo -e "1panghu999\n2JDHelloWorld\n3he1pu\n4shufflewzc"
echo -n "输入你想拉取的仓库编号(默认为 4):"
read -r defaultNum
defualtNum=${defaultNum:-'4'}
sed -i "s/\$default4/\$default$defaultNum/g" $extra_shell_path
# 将 extra.sh 添加到定时任务
if [ "$(grep -c extra.sh /ql/config/crontab.list)" = 0 ]; then
echo "开始添加 task extra.sh"
@ -49,13 +56,6 @@ if [ "$(grep -c extra.sh /ql/config/crontab.list)" = 0 ]; then
curl -s -H 'Accept: application/json' -H "Authorization: Bearer $token" -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept-Language: zh-CN,zh;q=0.9' --data-binary '{"name":"初始化任务","command":"ql extra","schedule":"15 0-23/4 * * *"}' --compressed 'http://127.0.0.1:5700/api/crons?t=1624782068473'
fi
# extra.sh 预设仓库及默认拉取仓库设置
echo -e "1panghu999\n2JDHelloWorld\n3he1pu\n4shufflewzc"
echo -n "输入你想拉取的仓库编号(默认为 4):"
read -r defaultNum
defualtNum=${defaultNum:-'4'}
sed -i "s/\$default4/\$default$defaultNum/g" $extra_shell_path
# 下载 code.sh
if [ ! -a "$code_shell_path" ]; then