summarylogtreecommitdiffstats
path: root/bitcoin.install
diff options
context:
space:
mode:
authorTomZ2017-02-21 17:10:14 +0100
committerTomZ2017-02-21 17:10:14 +0100
commit6122da78eab610c624476a5d1e6ba264ac180e68 (patch)
tree81edb3cfee10cbf0d7d97c4036848f9f4391fe5e /bitcoin.install
parentc9631baa71dacb296c9d2f1123ae19409e0356d0 (diff)
downloadaur-6122da78eab610c624476a5d1e6ba264ac180e68.tar.gz
fixes
Diffstat (limited to 'bitcoin.install')
-rw-r--r--bitcoin.install9
1 files changed, 4 insertions, 5 deletions
diff --git a/bitcoin.install b/bitcoin.install
index 35a07dc58615..a24221ce4cee 100644
--- a/bitcoin.install
+++ b/bitcoin.install
@@ -4,22 +4,21 @@ _bc_group=bitcoin
post_install() {
_mkuser
_dir="/var/lib/bitcoind"
+ _cnf="/etc/bitcoin"
if test -d "$_dir"; then
# disable Copy-On-Write (btrfs directories only)
# This avoids lots of known db-corruption issues
_is_btrfs "$_dir" && chattr +C "$_dir"
else
- mkdir "$_dir"
- chown -R $_bc_user:$_bc_group "$_dir"
- chmod 750 "$_dir"
+ mkdir -m 750 "$_dir"
fi
- chown -R $_bc_user:$_bc_group "$_dir"
+ chown -R $_bc_user:$_bc_group "$_dir" "$_cnf"
+ chmod 775 "$_cnf"
printf "%b\n" "$bitcoin"
}
post_upgrade() {
_mkuser
- chown -R $_bc_user:$_bc_group /etc/bitcoin
printf "%b\n" "$bitcoin"
}