Skip to content

Commit

Permalink
postremove fixes
Browse files Browse the repository at this point in the history
postremovals of packages should now be more appropriate for the host,
before they were doing some really dumb stuff.

Signed-off-by: Erik Hollensbe <[email protected]>
  • Loading branch information
Erik Hollensbe committed May 29, 2021
1 parent 489ca26 commit fdea3f3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ nfpms:
dst: /lib/systemd/system/zerotier-systemd-manager.service
type: "config"
scripts:
postinstall: "postrun.sh"
postremove: "postrun.sh"
postinstall: "pkgsrc/postinstall.sh"
postremove: "pkgsrc/postremove.sh"
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
2 changes: 1 addition & 1 deletion postrun.sh → pkgsrc/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -xeu

mv /var/run/zerotier-one.service /lib/systemd/system
test -f /var/run/zerotier-one.service && mv /var/run/zerotier-one.service /lib/systemd/system
systemctl daemon-reload
systemctl enable zerotier-systemd-manager.timer
systemctl start zerotier-systemd-manager.timer
4 changes: 4 additions & 0 deletions pkgsrc/postremove.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

set -xeu
systemctl daemon-reload

0 comments on commit fdea3f3

Please sign in to comment.