summarylogtreecommitdiffstats
path: root/bs.install
diff options
context:
space:
mode:
authorAndy Weidenbaum2015-12-21 21:40:04 -0800
committerAndy Weidenbaum2015-12-21 21:40:04 -0800
commit30537775edefc9507a7976c2f2a8f39b73fa0f13 (patch)
treea3c5610c45799f3dcc64e757758dec7c9faf47cb /bs.install
parenteab765abda2de095a08f9eace4160e29eb1431cf (diff)
downloadaur-30537775edefc9507a7976c2f2a8f39b73fa0f13.tar.gz
increment pkgrel to 2; cleanup btrfs copy-on-write
Diffstat (limited to 'bs.install')
-rw-r--r--bs.install13
1 files changed, 7 insertions, 6 deletions
diff --git a/bs.install b/bs.install
index 8ba8f146cce..74e16de1f9f 100644
--- a/bs.install
+++ b/bs.install
@@ -3,7 +3,10 @@ _bs_group=bs
post_install() {
_mkuser
- _disable_cow
+ # disable Copy-On-Write (btrfs directories only)
+ for _dir in /srv/bs /var/log/bs; do
+ _is_btrfs "$_dir" && _disable_cow "$_dir"
+ done
chown -R $_bs_user:$_bs_group /etc/bs /srv/bs /var/log/bs
printf "%b\n" "$xx"
}
@@ -65,7 +68,7 @@ _chattrify() {
# disable btrfs CoW on re-made dir
chattr +C "$1"
- # recursive copy to restore backed up dir while mainintaining disabled CoW
+ # recursive copy to restore backed up dir while maintaining disabled CoW
[[ -d "${_orig_dir}"_old ]] \
&& find "${_orig_dir}"_old -mindepth 1 -maxdepth 1 -exec cp -R '{}' "$1" \;
@@ -76,13 +79,11 @@ _chattrify() {
[[ -d "${_orig_dir}"_old ]] && rm -rf "${_orig_dir}"_old
}
-# if blockchain or log dir has btrfs filesystem, disable CoW:
_disable_cow() {
- for _dir in /srv/bs /var/log/bs; do
- _is_btrfs "$_dir" && _chattrify "$_dir" "700" "$_bs_user" "$_bs_group"
- done
+ _chattrify "$1" "700" "$_bs_user" "$_bs_group"
}
+
read -d '' xx <<'EOF'
libbitcoin-server
=================