You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
litecoin/contrib/debian/bitcoind.postinst

28 lines
550 B

#!/bin/sh
# setup bitcoin account, homedir etc
set -e
BCUSER="bitcoin"
BCHOME="/var/lib/bitcoin"
if [ "$1" = "configure" ]; then
# Add bitcoin user/group - this will gracefully abort if the user already exists.
# A homedir is never created.
adduser --system --home "${BCHOME}" --no-create-home --group "${BCUSER}"
# 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