Skip to content

Instantly share code, notes, and snippets.

@jzila
Created November 21, 2017 21:52
Show Gist options
  • Save jzila/31e32d9d4feff8f172c243a75bfaf497 to your computer and use it in GitHub Desktop.
Save jzila/31e32d9d4feff8f172c243a75bfaf497 to your computer and use it in GitHub Desktop.
#!/bin/bash
_term() {
echo "Caught TERM signal"
kill -TERM "$SERVICE"
kill -TERM "$KBFS"
exit 0
}
trap _term SIGTERM
export KEYBASE_RUN_MODE=prod
export RUN_MODE=prod
keybase service &
SERVICE=$!
kbfsfuse -mount-type=none -log-to-file /keybase &
KBFS=$!
wait "$SERVICE"
wait "$KBFS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment