fixes
authorIan Kelling <ian@iankelling.org>
Fri, 15 Sep 2023 23:33:56 +0000 (19:33 -0400)
committerIan Kelling <ian@iankelling.org>
Fri, 15 Sep 2023 23:33:56 +0000 (19:33 -0400)
brc2
conflink
distro-end

diff --git a/brc2 b/brc2
index 1974c580b867ea432b9cff6b42664080888f9087..108be387fd24cf1a1d9f697feaf66787a5601d81 100644 (file)
--- 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"
       ;;
index 18a6ed84f0dc177c85e72ccf0aaa5adc075e93ca..855014377e8c74edc177e8906eede0787946d1d8 100755 (executable)
--- 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 #####
index 3fdcea310a6132e3af9b4f81adf97fc6606bd419..cdfd64dc112ec2e30b33e1d79a52c468e767dec4 100755 (executable)
@@ -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