ayaports/user/listmonk/listmonk.pre-install

22 lines
441 B
Text
Raw Permalink Normal View History

2024-02-23 06:20:52 +00:00
#!/bin/sh
# It's very important to set user/group correctly.
listmonk_dir='/var/lib/listmonk'
if ! getent group listmonk 1>/dev/null; then
echo '* Creating group listmonk' 1>&2
addgroup -S listmonk
fi
if ! id listmonk 2>/dev/null 1>&2; then
echo '* Creating user listmonk' 1>&2
adduser -DHS -G listmonk -h "$listmonk_dir" -s /bin/sh \
-g "added by apk for listmonk" listmonk
passwd -u listmonk 1>/dev/null # unlock
fi
exit 0