github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/kbfs/kbfsfuse/kbfsfuse.sh (about)

     1  #!/bin/bash
     2  
     3  _term() {
     4      echo "Caught TERM signal"
     5      kill -TERM "$SERVICE"
     6      kill -TERM "$KBFS"
     7      exit 0
     8  }
     9  trap _term SIGTERM
    10  
    11  if [ -z "$KEYBASE_TEST_ROOT_CERT_PEM" ]; then
    12      export KEYBASE_TEST_ROOT_CERT_PEM="$(echo $KEYBASE_TEST_ROOT_CERT_PEM_B64 | base64 -d)";
    13  fi
    14  if [ -z "$KBFS_METADATA_VERSION" ]; then
    15      export KBFS_METADATA_VERSION=4
    16  fi
    17  echo "Using KBFS metadata version $KBFS_METADATA_VERSION"
    18  
    19  if [ -f kbfs_revision ]; then
    20      echo "Running KBFS Docker with KBFS revision $(cat kbfs_revision)"
    21  fi
    22  if [ -f client_revision ]; then
    23      echo "Client revision $(cat client_revision)"
    24  fi
    25  
    26  git config --global user.email "you@example.com"
    27  git config --global user.name "Your Name"
    28  
    29  # Journaling is turned off by default for all tests, since some tests
    30  # depend on sync semantics.
    31  journalFlag="-enable-journal=${KBFS_JOURNAL_ENABLE:-false}"
    32  
    33  keybase -debug service &
    34  SERVICE=$!
    35  KEYBASE_DEBUG=1 kbfsfuse -debug -disk-cache-mode=local "$journalFlag" -mdserver $MDSERVER_ADDR -bserver $BSERVER_ADDR -localuser= -md-version $KBFS_METADATA_VERSION -log-to-file /keybase &
    36  KBFS=$!
    37  
    38  wait "$SERVICE"
    39  wait "$KBFS"