Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont hardcode cookie file #367

Merged
merged 10 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions deploy/setup
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,28 @@ systemctl daemon-reload
systemctl enable bitcoind
systemctl restart bitcoind

while [[ ! -f /var/lib/bitcoind/signet/.cookie ]]; do
echo Waiting for bitcoind…
case $CHAIN in
main)
COOKIE_FILE_DIR=/var/lib/bitcoind
;;
signet)
COOKIE_FILE_DIR=/var/lib/bitcoind/signet
;;
*)
echo "Unknown chain: $CHAIN"
exit 1
;;
esac

while [[ ! -f $COOKIE_FILE_DIR/.cookie ]]; do
echo "Waiting for bitcoind…"
sleep 1
done

setfacl -m ord:x /var/lib/bitcoind
setfacl -dm ord:r /var/lib/bitcoind
setfacl -m ord:r /var/lib/bitcoind/signet/.cookie
setfacl -m ord:x $COOKIE_FILE_DIR
setfacl -dm ord:r $COOKIE_FILE_DIR
setfacl -m ord:r $COOKIE_FILE_DIR/.cookie

cp deploy/ord.service /etc/systemd/system/
systemctl daemon-reload
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ deploy branch chain domain:
rsync -avz deploy/checkout root@{{domain}}:deploy/checkout
ssh root@{{domain}} 'cd deploy && ./checkout {{branch}} {{chain}} {{domain}}'

deploy-mainnet branch="master": (deploy branch "main" "ordinals.com")
deploy-mainnet: (deploy "master" "main" "ordinals.com")

deploy-signet branch="master": (deploy branch "signet" "signet.ordinals.com")

Expand Down