blockbook/build/deb/debian/blockbook-ethereum-testnet-ropsten.postinst

24 lines
482 B
Bash

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