This commit is contained in:
2022-02-03 23:45:47 -08:00
parent 42c2062cc4
commit 184ece190c
1438 changed files with 404064 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/bin/sh
# setup agrarian account, homedir etc
set -e
BCUSER="agrarian"
BCHOME="/var/lib/agrarian"
if [ "$1" = "configure" ]; then
# Add agrarian user/group - this will gracefully abort if the user already exists.
# A homedir is never created.
set +e
adduser --system --home "${BCHOME}" --no-create-home --group "${BCUSER}" 2>/dev/null
set -e
# If the homedir does not already exist, create it with proper
# ownership and permissions.
if [ ! -d "${BCHOME}" ]; then
mkdir -m 0750 -p "${BCHOME}"
chown "${BCUSER}:${BCUSER}" "${BCHOME}"
fi
fi
#DEBHELPER#
exit 0