diff options
Diffstat (limited to 'pkg/scripts/preinstall.sh')
| -rw-r--r-- | pkg/scripts/preinstall.sh | 14 | +14 −0 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/scripts/preinstall.sh b/pkg/scripts/preinstall.sh new file mode 100644 --- /dev/null +++ b/pkg/scripts/preinstall.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Copyright (c) 2026 Nikolay Govorov +# SPDX-License-Identifier: AGPL-3.0-or-later + +set -e + +for svc in mirum-server mirum-worker; do + if ! getent group $svc >/dev/null; then + groupadd --system $svc + fi + if ! getent passwd $svc >/dev/null; then + useradd --system --gid $svc --no-create-home --shell /usr/sbin/nologin $svc + fi +done |
