From 81e7b0b3200d423b5d32a2f8304f143b4cc1044f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 11 Dec 2022 11:51:25 +0800 Subject: [PATCH] Fix linux package --- .goreleaser.yaml | 3 +++ release/config/postinstall.sh | 3 +++ release/config/postremove.sh | 3 +++ 3 files changed, 9 insertions(+) create mode 100755 release/config/postinstall.sh create mode 100755 release/config/postremove.sh diff --git a/.goreleaser.yaml b/.goreleaser.yaml index bb217c69..70e0dc46 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -70,6 +70,9 @@ nfpms: dst: /etc/systemd/system/sing-box@.service - src: LICENSE dst: /usr/share/licenses/sing-box/LICENSE + scripts: + postinstall: release/config/postinstall.sh + postremove: release/config/postremove.sh source: enabled: false name_template: '{{ .ProjectName }}-{{ .Version }}.source' diff --git a/release/config/postinstall.sh b/release/config/postinstall.sh new file mode 100755 index 00000000..a1fa18b1 --- /dev/null +++ b/release/config/postinstall.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +mkdir "/var/lib/sing-box" \ No newline at end of file diff --git a/release/config/postremove.sh b/release/config/postremove.sh new file mode 100755 index 00000000..fd2cdd87 --- /dev/null +++ b/release/config/postremove.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +rm -rf "/var/lib/sing-box" \ No newline at end of file