File tree 3 files changed +20
-14
lines changed
3 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,17 @@ warn() {
47
47
echo -e " \n$is_warn $@ \n"
48
48
}
49
49
50
+ # load bash script.
51
+ load () {
52
+ . $is_sh_dir /src/$1
53
+ }
54
+
55
+ # wget add --no-check-certificate
56
+ _wget () {
57
+ # [[ $proxy ]] && export https_proxy=$proxy
58
+ wget --no-check-certificate " $@ "
59
+ }
60
+
50
61
# yum or apt-get
51
62
cmd=$( type -P apt-get || type -P yum)
52
63
@@ -111,6 +122,12 @@ else
111
122
fi
112
123
if [[ -f $is_caddy_bin && -d $is_caddy_dir && $is_caddy_service ]]; then
113
124
is_caddy=1
125
+ # fix caddy run; ver >= 2.8.2
126
+ [[ ! $( grep ' \-\-adapter caddyfile' /lib/systemd/system/caddy.service) ]] && {
127
+ load systemd.sh
128
+ install_service caddy
129
+ systemctl restart caddy &
130
+ }
114
131
is_caddy_ver=$( $is_caddy_bin version | head -n1 | cut -d " " -f1)
115
132
if [[ $( pgrep -f $is_caddy_bin ) ]]; then
116
133
is_caddy_status=$( _green running)
@@ -120,17 +137,6 @@ if [[ -f $is_caddy_bin && -d $is_caddy_dir && $is_caddy_service ]]; then
120
137
fi
121
138
fi
122
139
123
- # load bash script.
124
- load () {
125
- . $is_sh_dir /src/$1
126
- }
127
-
128
- # wget add --no-check-certificate
129
- _wget () {
130
- # [[ $proxy ]] && export https_proxy=$proxy
131
- wget --no-check-certificate " $@ "
132
- }
133
-
134
140
load core.sh
135
141
# old sh ver
136
142
is_old_dir=/etc/v2ray/233boy
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ Requires=network-online.target
39
39
Type=notify
40
40
User=root
41
41
Group=root
42
- ExecStart=$is_caddy_bin run --environ --config $is_caddyfile
43
- ExecReload=$is_caddy_bin reload --config $is_caddyfile
42
+ ExecStart=$is_caddy_bin run --environ --config $is_caddyfile --adapter caddyfile
43
+ ExecReload=$is_caddy_bin reload --config $is_caddyfile --adapter caddyfile
44
44
TimeoutStopSec=5s
45
45
LimitNPROC=10000
46
46
LimitNOFILE=1048576
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
args=$@
4
- is_sh_ver=v4.19
4
+ is_sh_ver=v4.20
5
5
6
6
. /etc/v2ray/sh/src/init.sh
You can’t perform that action at this time.
0 commit comments