Commit 26caca0 1 parent b462cb9 commit 26caca0 Copy full SHA for 26caca0
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
96
107
fi
97
108
if [[ -f $is_caddy_bin && -d $is_caddy_dir && $is_caddy_service ]]; then
98
109
is_caddy=1
110
+ # fix caddy run; ver >= 2.8.2
111
+ [[ ! $( grep ' \-\-adapter caddyfile' /lib/systemd/system/caddy.service) ]] && {
112
+ load systemd.sh
113
+ install_service caddy
114
+ systemctl restart caddy &
115
+ }
99
116
is_caddy_ver=$( $is_caddy_bin version | head -n1 | cut -d " " -f1)
100
117
if [[ $( pgrep -f $is_caddy_bin ) ]]; then
101
118
is_caddy_status=$( _green running)
@@ -105,17 +122,6 @@ if [[ -f $is_caddy_bin && -d $is_caddy_dir && $is_caddy_service ]]; then
105
122
fi
106
123
fi
107
124
108
- # load bash script.
109
- load () {
110
- . $is_sh_dir /src/$1
111
- }
112
-
113
- # wget add --no-check-certificate
114
- _wget () {
115
- # [[ $proxy ]] && export https_proxy=$proxy
116
- wget --no-check-certificate " $@ "
117
- }
118
-
119
125
load core.sh
120
126
[[ ! $args ]] && args=main
121
127
main $args
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=v1.19
4
+ is_sh_ver=v1.20
5
5
6
6
. /etc/xray/sh/src/init.sh
You can’t perform that action at this time.
0 commit comments