Revert remove install shell

This commit is contained in:
世界 2023-03-26 09:36:18 +08:00
parent 3b3a251008
commit 09b001e795
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
3 changed files with 5 additions and 0 deletions

View File

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

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

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

View File

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