From b1f87cc8bd1764dac5ba39cf75e513cfc5493ca7 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Fri, 15 Sep 2023 19:33:56 -0400 Subject: [PATCH] fixes --- brc2 | 10 +++++----- conflink | 2 -- distro-end | 4 ++++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/brc2 b/brc2 index 1974c58..108be38 100644 --- a/brc2 +++ b/brc2 @@ -420,7 +420,7 @@ astudio() { # Convert brains file path to url and vice versa # usage: brains [URL_OR_PATH] brains() { - _iki-convert '(/a)?/f/brains' brains.fsf.org "$@" + _iki-convert '(/a)?/f/brains' brains.fsf.org/wiki "$@" } glue() { _iki-convert '(/a)?/f/gluestick' gluestick.office.fsf.org "$@" @@ -428,9 +428,9 @@ glue() { # usage: $0 REPO_PATH [URL_OR_PATH] _iki-convert() { - local url domain path input err repo_dir dir url_dir url + local url prefix path input err repo_dir dir url_dir url repo_dir="$1" - domain="$2" + prefix="$2" shift 2 err=false if $err; then @@ -443,7 +443,7 @@ _iki-convert() { fi case $input in http*) - path="$repo_dir/${input##http*://"$domain"/wiki/}" + path="$repo_dir/${input##http*://"$prefix"/}" if [[ $path == */ ]]; then path=${path%/}.mdwn fi @@ -452,7 +452,7 @@ _iki-convert() { *) path=$(fp "$input") url_dir=$(echo "$path" | sed -r "s,^$repo_dir/,,") - url="https://$domain/wiki/$url_dir" + url="https://$prefix/$url_dir" url="${url%.mdwn}/" j echo "$url" ;; diff --git a/conflink b/conflink index 18a6ed8..8550143 100755 --- a/conflink +++ b/conflink @@ -242,8 +242,6 @@ case $user in if [[ -d /var/lib/bitcoind && -d /p/c/user-specific/bitcoin ]]; then s rsync -clpgoDiSAX --chmod=Dg-s --chown=bitcoin:bitcoin /p/c/user-specific/bitcoin/settings.json /var/lib/bitcoind - # i'm not sure of the perfect permissions here, but - # 640 seems good. s rsync -rclpgoDiSAX --chmod=Dg-s --chown=root:bitcoin /p/c/user-specific/bitcoin/bitcoin /etc fi ##### end special extra stuff ##### diff --git a/distro-end b/distro-end index 3fdcea3..cdfd64d 100755 --- a/distro-end +++ b/distro-end @@ -2170,6 +2170,10 @@ case $HOSTNAME in sudo usermod -a -G bitcoin iank # todo: make bitcoin have a stable uid/gid if [[ ! $(readlink -f /var/lib/bitcoind/wallets) == /q/wallets ]]; then + mkdir -p /var/lib/bitcoind + chown bitcoin:bitcoin /var/lib/bitcoind + # 710 comes from the upstream bitcoin unit file + chmod 710 /var/lib/bitcoind s lnf /q/wallets /var/lib/bitcoind sudo chown -h bitcoin:bitcoin /var/lib/bitcoind/wallets fi -- 2.30.2