blockbook/build/deb/debian/blockbook-zcash.postinst

24 lines
429 B
Bash

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