Browse Source

Revert remove install shell

世界 2 years ago
parent
commit
09b001e795
3 changed files with 5 additions and 0 deletions
  1. 1 0
      .goreleaser.yaml
  2. 3 0
      release/config/postinstall.sh
  3. 1 0
      release/local/install.sh

+ 1 - 0
.goreleaser.yaml

@@ -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 - 0
release/config/postinstall.sh

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

+ 1 - 0
release/local/install.sh

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