summarylogtreecommitdiffstats
path: root/bitcoin.install
diff options
context:
space:
mode:
authorTomZ2017-02-23 13:11:37 +0100
committerTomZ2017-02-23 13:11:37 +0100
commitedddea3646e1a1da3215ee993add4ea3dbf0a350 (patch)
treee3757ccf14d82a91d9a91a26c18592fafe6b1dbb /bitcoin.install
parent60504da5d518a983c3a094afdd1881859d549240 (diff)
downloadaur-edddea3646e1a1da3215ee993add4ea3dbf0a350.tar.gz
fixes
Diffstat (limited to 'bitcoin.install')
-rw-r--r--bitcoin.install5
1 files changed, 2 insertions, 3 deletions
diff --git a/bitcoin.install b/bitcoin.install
index a24221ce4cee..a42cd1eea7e8 100644
--- a/bitcoin.install
+++ b/bitcoin.install
@@ -5,12 +5,11 @@ post_install() {
_mkuser
_dir="/var/lib/bitcoind"
_cnf="/etc/bitcoin"
- if test -d "$_dir"; then
+ if test ! -d "$_dir"; then
+ mkdir -m 750 "$_dir"
# disable Copy-On-Write (btrfs directories only)
# This avoids lots of known db-corruption issues
_is_btrfs "$_dir" && chattr +C "$_dir"
- else
- mkdir -m 750 "$_dir"
fi
chown -R $_bc_user:$_bc_group "$_dir" "$_cnf"
chmod 775 "$_cnf"