mirror of
https://github.com/mailscope/kumomta.git
synced 2026-10-24 23:42:26 +00:00
create kumod user during rpm and deb install
I haven't tested the deb stuff explicitly, will see what happens when it makes it through CI
This commit is contained in:
@@ -34,6 +34,15 @@ EOF
|
||||
|
||||
./assets/install.sh pkg/debian/opt/kumomta
|
||||
|
||||
cat > pkg/debian/preinst <<EOF
|
||||
#!/bin/sh
|
||||
getent group kumod >/dev/null || groupadd --system kumod
|
||||
getent passwd kumod >/dev/null || \
|
||||
useradd --system -g kumod -d /var/spool/kumod -s /sbin/nologin \
|
||||
-c "Service account for kumomta" kumod
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
deps=$(cd pkg && dpkg-shlibdeps -O -e debian/opt/kumomta/*bin/*)
|
||||
mv pkg/debian/control pkg/debian/DEBIAN/control
|
||||
sed -i '/^Source:/d' pkg/debian/DEBIAN/control # The `Source:` field needs to be valid in a binary package
|
||||
|
||||
@@ -27,6 +27,7 @@ Packager: Wez Furlong <wez@wezfurlong.org>
|
||||
License: MIT
|
||||
URL: https://kumomta.com
|
||||
Summary: A high performance, modern MTA.
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
%description
|
||||
A high performance, modern MTA.
|
||||
@@ -34,6 +35,13 @@ A high performance, modern MTA.
|
||||
%build
|
||||
echo "Doing the build bit here"
|
||||
|
||||
%pre
|
||||
getent group kumod >/dev/null || groupadd --system kumod
|
||||
getent passwd kumod >/dev/null || \
|
||||
useradd --system -g kumod -d /var/spool/kumod -s /sbin/nologin \
|
||||
-c "Service account for kumomta" kumod
|
||||
exit 0
|
||||
|
||||
%install
|
||||
set -x
|
||||
cd ${HERE}
|
||||
|
||||
Reference in New Issue
Block a user