Files
pezkuwi-subxt/polkadot/scripts/packaging/deb-maintainer-scripts/postinst
T
s3krit f3abba15c6 Add deb and RPM repository config and documentation (#1676)
Co-authored-by: Parity Releases <releases@parity.io>
Co-authored-by: Demi Marie Obenour <demiobenour@gmail.com>
2020-09-10 17:22:20 +02:00

18 lines
439 B
Bash

#!/bin/sh
set -e
action="$1"
config_file="/etc/default/polkadot"
if [ "$action" = "configure" ]; then
# Make user and group
getent group polkadot >/dev/null 2>&1 || addgroup --system polkadot
getent passwd polkadot >/dev/null 2>&1 ||
adduser --system --home /home/polkadot --disabled-password \
--ingroup polkadot polkadot
if [ ! -e "$config_file" ]; then
echo 'POLKADOT_CLI_ARGS=""' > /etc/default/polkadot
fi
fi