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
- 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'

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"