mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 01:39:34 +08:00
Create service user as system user (#867)
This commit is contained in:
committed by
GitHub
parent
68009c85a5
commit
ca7642cc91
@@ -317,14 +317,14 @@ fi
|
||||
if is_alpine; then
|
||||
if ! id -u beszel >/dev/null 2>&1; then
|
||||
echo "Creating a dedicated user for the Beszel Agent service..."
|
||||
adduser -D -H -s /sbin/nologin beszel
|
||||
adduser -S -D -H -s /sbin/nologin beszel
|
||||
fi
|
||||
# Add the user to the docker group to allow access to the Docker socket
|
||||
addgroup beszel docker
|
||||
else
|
||||
if ! id -u beszel >/dev/null 2>&1; then
|
||||
echo "Creating a dedicated user for the Beszel Agent service..."
|
||||
useradd -M -s /bin/false beszel
|
||||
useradd --system --home-dir /nonexistent --shell /bin/false beszel
|
||||
fi
|
||||
# Add the user to the docker group to allow access to the Docker socket
|
||||
usermod -aG docker beszel
|
||||
|
Reference in New Issue
Block a user