File tree Expand file tree Collapse file tree 5 files changed +101
-2
lines changed Expand file tree Collapse file tree 5 files changed +101
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ show_help() {
12
12
echo " CheckSSL (download)"
13
13
echo " install-cri-docker (download|execute)"
14
14
echo " install-nginx (download|execute)"
15
+ echo " install-g (download|execute)"
15
16
echo " mng (download)"
16
17
echo " OpenSSL (download|execute)"
17
18
echo " SystemInfoMonitor (download)"
65
66
" env" )
66
67
url=" https://download.elisky.cn/scripts/shell/.env-template"
67
68
;;
69
+ " install-g" )
70
+ url=" https://download.elisky.cn/scripts/shell/install-gvm.sh"
71
+ ;;
68
72
* )
69
73
show_help
70
74
exit 1
Original file line number Diff line number Diff line change @@ -165,7 +165,8 @@ docker_daemon_install() {
165
165
sudo sh -c ' cat > /etc/docker/daemon.json' << EOF
166
166
{
167
167
"registry-mirrors": [
168
- "https://docker.eli1.top"
168
+ "https://docker.eli1.top",
169
+ "https://docker.m.daocloud.io"
169
170
]
170
171
}
171
172
EOF
@@ -193,7 +194,15 @@ main() {
193
194
systemctl daemon-reload
194
195
systemctl enable containerd.service --now
195
196
systemctl enable docker.service --now
197
+ mkdir -p /usr/libexec/docker/cli-plugins
198
+ curl -Ls https://github.eli1.top/https://github.eli1.top/https://github.com/docker/compose/releases/download/v2.36.1/docker-compose-` uname -s` -` uname -m` > /usr/libexec/docker/cli-plugins/docker-compose; chmod a+x /usr/libexec/docker/cli-plugins/docker-compose
196
199
# newgrp docker
200
+ if [ -x " $( command -v bash) " ]; then
201
+ source <( docker completion bash) ; echo " source <(docker completion bash)" >> ${HOME} /.bashrc
202
+ fi
203
+ if [ -x " $( command -v zsh) " ]; then
204
+ source <( docker completion zsh) ; echo " source <(docker completion zsh)" >> ${HOME} /.zshrc
205
+ fi
197
206
else
198
207
echo " Failed to download Docker ${version} ."
199
208
fi
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -e
3
+
4
+ function get_arch() {
5
+ a=$( uname -m)
6
+ case ${a} in
7
+ " x86_64" | " amd64" )
8
+ echo " amd64"
9
+ ;;
10
+ " i386" | " i486" | " i586" )
11
+ echo " 386"
12
+ ;;
13
+ " aarch64" | " arm64" )
14
+ echo " arm64"
15
+ ;;
16
+ " armv6l" | " armv7l" )
17
+ echo " arm"
18
+ ;;
19
+ " s390x" )
20
+ echo " s390x"
21
+ ;;
22
+ * )
23
+ echo ${NIL}
24
+ ;;
25
+ esac
26
+ }
27
+
28
+ function get_os() {
29
+ echo $( uname -s | awk ' {print tolower($0)}' )
30
+ }
31
+
32
+ function main() {
33
+ local release=" 1.7.0"
34
+ local os=$( get_os)
35
+ local arch=$( get_arch)
36
+ local dest_file=" ${HOME} /.g/downloads/g${release} .${os} -${arch} .tar.gz"
37
+ local url=" https://github.eli1.top/https://github.com/voidint/g/releases/download/v${release} /g${release} .${os} -${arch} .tar.gz"
38
+
39
+ echo " [1/3] Downloading ${url} "
40
+ rm -f " ${dest_file} "
41
+ if [ -x " $( command -v wget) " ]; then
42
+ wget -q -P " ${HOME} /.g/downloads" " ${url} "
43
+ else
44
+ curl -s -S -L --create-dirs -o " ${dest_file} " " ${url} "
45
+ fi
46
+
47
+ echo " [2/3] Install g to the ${HOME} /.g/bin"
48
+ mkdir -p " ${HOME} /.g/bin"
49
+ tar -xz -f " ${dest_file} " -C " ${HOME} /.g/bin"
50
+ chmod +x " ${HOME} /.g/bin/g"
51
+
52
+ echo " [3/3] Set environment variables"
53
+ cat > ${HOME} /.g/env << -'EOF '
54
+ #!/bin/sh
55
+ # g shell setup
56
+ export GOROOT="${HOME}/.g/go"
57
+ export PATH="${HOME}/.g/bin:${GOROOT}/bin:${GOPATH}/bin:$PATH"
58
+ export G_MIRROR=https://golang.google.cn/dl/
59
+ EOF
60
+
61
+ if [ -x " $( command -v bash) " ]; then
62
+ cat >> ${HOME} /.bashrc << -'EOF '
63
+
64
+ [ -s "${HOME}/.g/env" ] && \. "${HOME}/.g/env" # g shell setup
65
+
66
+ EOF
67
+ source ${HOME} /.bashrc
68
+ fi
69
+
70
+ if [ -x " $( command -v zsh) " ]; then
71
+ cat >> ${HOME} /.zshrc << -'EOF '
72
+
73
+ [ -s "${HOME}/.g/env" ] && \. "${HOME}/.g/env" # g shell setup
74
+
75
+ EOF
76
+ source ${HOME} /.zshrc
77
+ fi
78
+
79
+ echo -e " \nTo configure your current shell, run:\nsource \" $HOME /.g/env\" "
80
+
81
+ exit 0
82
+ }
83
+
84
+ main
Original file line number Diff line number Diff line change 72
72
use_http3_upstreams : false
73
73
serve_plain_dns : true
74
74
hostsfile_enabled : true
75
+ pending_requests :
76
+ enabled : true
75
77
tls :
76
78
enabled : true
77
79
server_name : dns.s.eli1.top
Original file line number Diff line number Diff line change 1
- # 更新时间:2025-04-16 02:30:02
1
+ # 更新时间:2025-05-21 02:30:01
2
2
3
3
# 来自https://github.eli1.top/https://raw.githubusercontent.com/BlueSkyXN/AdGuardHomeRules/master/ok.txt
4
4
You can’t perform that action at this time.
0 commit comments