
| Current Path : /var/lib/dpkg/info/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/lib/dpkg/info/zookeeper.postinst |
#!/bin/sh
set -e
NAME="zookeeper"
GROUP=$NAME
USER=$NAME
DATADIR="/var/lib/zookeeper"
# shamelessly copied from debian mysql-server package...
if ! getent group $GROUP >/dev/null ; then
# Adding system group
addgroup --system $GROUP >/dev/null
fi
# creating zookeeper user if it isn't already there
if ! getent passwd $USER >/dev/null ; then
# Adding system user
adduser \
--system \
--disabled-login \
--ingroup $GROUP \
--home $DATADIR \
--gecos "ZooKeeper" \
--shell /bin/false \
$USER >/dev/null
fi
chown $USER:$GROUP /var/log/$NAME
chown $USER:$GROUP /var/lib/$NAME
chmod o-rwx /var/lib/$NAME
update-alternatives --install /etc/$NAME/conf $NAME-conf /etc/$NAME/conf_example 5