summaryrefslogtreecommitdiffhomepage
path: root/pkg/deb/debian
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-04-06 20:43:22 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-04-06 20:43:22 -0700
commit00ff4ca4962370fe42d235d170570bc0691d5d09 (patch)
tree1a326c33aeee9b0f5f369197498a17a432ad6f2d /pkg/deb/debian
parentd56ff075516a6e7249ec589d0279610b2dbc9164 (diff)
downloadunit-00ff4ca4962370fe42d235d170570bc0691d5d09.tar.gz
unit-00ff4ca4962370fe42d235d170570bc0691d5d09.tar.bz2
Packages: use groupadd/useradd on Debian-based operating systems.
addgroup/adduser will no longer be installed by default in the "minbase". Also, moving to lower-level utilities saves us one runtime dependency.
Diffstat (limited to 'pkg/deb/debian')
-rwxr-xr-xpkg/deb/debian/unit.postinst9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/deb/debian/unit.postinst b/pkg/deb/debian/unit.postinst
index 8aa476b3..44301f2d 100755
--- a/pkg/deb/debian/unit.postinst
+++ b/pkg/deb/debian/unit.postinst
@@ -25,17 +25,16 @@ BANNER
fi
if ! getent group unit >/dev/null; then
- addgroup --system unit >/dev/null
+ groupadd --system unit >/dev/null
fi
if ! getent passwd unit >/dev/null; then
- adduser \
+ useradd \
--system \
- --disabled-login \
- --ingroup unit \
+ --gid unit \
--no-create-home \
--home /nonexistent \
- --gecos "unit user" \
+ --comment "unit user" \
--shell /bin/false \
unit >/dev/null
fi