From 09b001e7952f55314dda03a277f44cd1c4b44f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 26 Mar 2023 09:36:18 +0800 Subject: [PATCH] Revert remove install shell --- .goreleaser.yaml | 1 + release/config/postinstall.sh | 3 +++ release/local/install.sh | 1 + 3 files changed, 5 insertions(+) create mode 100755 release/config/postinstall.sh diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e12d3030..4068cd05 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -118,6 +118,7 @@ nfpms: - src: LICENSE dst: /usr/share/licenses/sing-box/LICENSE scripts: + postinstall: release/config/postinstall.sh postremove: release/config/postremove.sh source: enabled: false diff --git a/release/config/postinstall.sh b/release/config/postinstall.sh new file mode 100755 index 00000000..0fb0f05f --- /dev/null +++ b/release/config/postinstall.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +mkdir -p /var/lib/sing-box \ No newline at end of file diff --git a/release/local/install.sh b/release/local/install.sh index 24e9d006..4d5b9e1b 100755 --- a/release/local/install.sh +++ b/release/local/install.sh @@ -14,6 +14,7 @@ go install -v -trimpath -ldflags "-s -w -buildid=" -tags with_quic,with_wireguar popd sudo cp $(go env GOPATH)/bin/sing-box /usr/local/bin/ +sudo mkdir -p /var/lib/sing-box sudo mkdir -p /usr/local/etc/sing-box sudo cp $PROJECT/release/config/config.json /usr/local/etc/sing-box/config.json sudo cp $DIR/sing-box.service /etc/systemd/system