Fix linux package

This commit is contained in:
世界 2022-12-11 11:51:25 +08:00
parent a828c3b5da
commit 81e7b0b320
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
3 changed files with 9 additions and 0 deletions

View File

@ -70,6 +70,9 @@ nfpms:
dst: /etc/systemd/system/sing-box@.service dst: /etc/systemd/system/sing-box@.service
- src: LICENSE - src: LICENSE
dst: /usr/share/licenses/sing-box/LICENSE dst: /usr/share/licenses/sing-box/LICENSE
scripts:
postinstall: release/config/postinstall.sh
postremove: release/config/postremove.sh
source: source:
enabled: false enabled: false
name_template: '{{ .ProjectName }}-{{ .Version }}.source' name_template: '{{ .ProjectName }}-{{ .Version }}.source'

3
release/config/postinstall.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
mkdir "/var/lib/sing-box"

3
release/config/postremove.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
rm -rf "/var/lib/sing-box"