blockbook/build/deb/debian/blockbook-bgold.postinst
2018-06-06 14:06:46 +02:00

24 lines
429 B
Bash

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