[*] 更新 git proxy
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 10s
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 10s
[-] 已安装docker的不执行重启
This commit is contained in:
parent
96141a2f97
commit
3e913215f1
@ -18,9 +18,7 @@ elif command_exists docker; then
|
||||
echo "Docker 已安装.... 跳过安装"
|
||||
else
|
||||
curl -sSL https://git.martin98.com/MartinFarm/init/raw/branch/main/docker-install.sh | sh
|
||||
fi
|
||||
|
||||
cat > /etc/docker/daemon.json <<EOF
|
||||
cat > /etc/docker/daemon.json <<EOF
|
||||
{
|
||||
"registry-mirrors": [
|
||||
"https://docker.martin98.com",
|
||||
@ -29,9 +27,9 @@ cat > /etc/docker/daemon.json <<EOF
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
if pidof systemd >/dev/null 2>&1; then
|
||||
systemctl restart docker
|
||||
else
|
||||
echo "systemctl 不存在,跳过 docker 重启。"
|
||||
fi
|
||||
if pidof systemd >/dev/null 2>&1; then
|
||||
systemctl restart docker
|
||||
else
|
||||
echo "systemctl 不存在,跳过 docker 重启。"
|
||||
fi
|
||||
fi
|
@ -3,7 +3,9 @@
|
||||
# 检查 git 是否安装
|
||||
if command -v git > /dev/null 2>&1; then
|
||||
echo "git 已安装,正在配置镜像源..."
|
||||
git config --global url."https://git-proxy.hk.martin98.com/".insteadOf "https://"
|
||||
# 曾经设置过的强制取消
|
||||
git config --global --unset url."https://git-proxy.hk.martin98.com/".insteadOf
|
||||
git config --global url."https://git-proxy.hk.martin98.com/https://github.com/".insteadOf "https://github.com/"
|
||||
echo "镜像源配置完成。"
|
||||
else
|
||||
echo "git 不存在,跳过..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user