blockbook/build/deb/debian/blockbook-zec.postinst
2018-05-15 17:22:02 +02:00

24 lines
415 B
Bash

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