Skip to content

Commit

Permalink
Add separate pre-install script for alpine, which doesn't have "usera…
Browse files Browse the repository at this point in the history
…dd" and "groupadd"
  • Loading branch information
matyasselmeci committed Dec 26, 2024
1 parent 91ac9f1 commit df794c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ nfpms:
mode: 0755
owner: pelican
group: pelican
scripts:
preinstall: "scripts/preinstall-alpine.sh"
# end package pelican

- package_name: pelican-osdf-compat
Expand Down
6 changes: 6 additions & 0 deletions scripts/preinstall-alpine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

getent group pelican >/dev/null || addgroup -S pelican
getent passwd pelican >/dev/null || \
adduser -S -G pelican -g "Pelican service user" \
-s /sbin/nologin -D -H -h /var/lib/pelican pelican

0 comments on commit df794c7

Please sign in to comment.