blockbook/contrib/backends/zcash/debian/zcash-zec.postinst
2018-05-15 17:22:02 +02:00

23 lines
396 B
Bash

#!/bin/bash
set -e
case "$1" in
configure)
if ! id -u zcash &> /dev/null
then
useradd --system -M -U zcash -s /bin/false
fi
if [ "$(stat -c '%U' /opt/coins/data/zec/zcash)" != "zcash" ]
then
chown -R zcash:zcash /opt/coins/data/zec/zcash
fi
HOME=/opt/coins/data/zec/zcash /opt/coins/nodes/zcash/zec/bin/zcash-fetch-params
;;
esac
#DEBHELPER#