File tree Expand file tree Collapse file tree 3 files changed +20
-14
lines changed
Expand file tree Collapse file tree 3 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,17 @@ warn() {
4747 echo -e " \n$is_warn $@ \n"
4848}
4949
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+
5061# yum or apt-get
5162cmd=$( type -P apt-get || type -P yum)
5263
@@ -111,6 +122,12 @@ else
111122fi
112123if [[ -f $is_caddy_bin && -d $is_caddy_dir && $is_caddy_service ]]; then
113124 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+ }
114131 is_caddy_ver=$( $is_caddy_bin version | head -n1 | cut -d " " -f1)
115132 if [[ $( pgrep -f $is_caddy_bin ) ]]; then
116133 is_caddy_status=$( _green running)
@@ -120,17 +137,6 @@ if [[ -f $is_caddy_bin && -d $is_caddy_dir && $is_caddy_service ]]; then
120137 fi
121138fi
122139
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-
134140load core.sh
135141# old sh ver
136142is_old_dir=/etc/v2ray/233boy
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ Requires=network-online.target
3939Type=notify
4040User=root
4141Group=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
4444TimeoutStopSec=5s
4545LimitNPROC=10000
4646LimitNOFILE=1048576
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33args=$@
4- is_sh_ver=v4.19
4+ is_sh_ver=v4.20
55
66. /etc/v2ray/sh/src/init.sh
You can’t perform that action at this time.
0 commit comments