From 52ab4c8133fa2664484b6e5b98cbdec80c049d55 Mon Sep 17 00:00:00 2001 From: AhFei Date: Thu, 12 Jan 2023 23:13:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=AE=88=E6=8A=A4=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E5=92=8C=E9=87=87=E7=94=A8=E5=8F=82=E6=95=B0=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- naivesetup.sh | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/naivesetup.sh b/naivesetup.sh index e8f9117..ef74b0b 100644 --- a/naivesetup.sh +++ b/naivesetup.sh @@ -9,7 +9,7 @@ wget "https://go.dev/dl/$(curl https://go.dev/VERSION?m=text).linux-amd64.tar.gz echo 'export GOROOT=/usr/local/go' >> /etc/profile echo 'export PATH=$GOROOT/bin:$PATH' >> /etc/profile source /etc/profile -echo $(go version) && rm go*.linux-amd64.tar.gz +echo $(go version) && rm go*.linux-amd64.tar.gz # 移除为了不影响将来升级 # 编译安装caddy+naive go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest && \ @@ -17,34 +17,54 @@ go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest && \ chmod +x caddy cp caddy /usr/bin/ -echo $(/usr/bin/caddy version) && rm -r go +echo $(/usr/bin/caddy version) && rm -r go # 移除go为了不影响将来升级 setcap cap_net_bind_service=+ep /usr/bin/caddy # 添加配置文件 mkdir /etc/caddy/ cat > /etc/caddy/Caddyfile < /etc/systemd/system/naiveCaddy.service <