summarylogtreecommitdiffstats
path: root/bitcoin.install
diff options
context:
space:
mode:
authorTomZ2017-02-23 13:10:58 +0100
committerTomZ2017-02-23 13:10:58 +0100
commit5eaaf287f2ade002eca05a6b91c06ded99a82027 (patch)
treece32078a5bc20b61de20ad9ba88e0f144ff85b50 /bitcoin.install
parent6122da78eab610c624476a5d1e6ba264ac180e68 (diff)
downloadaur-5eaaf287f2ade002eca05a6b91c06ded99a82027.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"