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 <