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