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