Zealot/build/scripts/postinst
Gregory Ballantine cab06fc350
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Changed project named from adept to zealot
2022-09-02 02:04:07 -04:00

27 lines
559 B
Bash
Executable File

#!/bin/sh
GETENT_USER=$(getent passwd zealot)
GETENT_GROUP=$(getent group zealot)
# Create the zealot user if it doesn't already exist
if [ "$GETENT_USER" = "" ]; then
useradd -r zealot
else
echo "The 'zealot' user already exists, skipping creation."
fi
# Create the zealot group if it doesn't already exist
if [ "$GETENT_GROUP" = "" ]; then
groupadd zealot
usermod -aG zealot zealot
else
echo "The 'zealot' group already exists, skipping creation."
fi
# Change the directory ownership of /etc
chown -R zealot:zealot /etc/zealot
#DEBHELPER#
exit 0