blockbook/build/deb/debian/blockbook-btg.postinst
2018-06-06 13:02:41 +02:00

24 lines
415 B
Bash

#!/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#