2020-05-25 13:58:46 +02:00
|
|
|
#!/usr/local/bin/zsh
|
2021-07-25 08:20:35 +02:00
|
|
|
cd "$HOME/electrs"
|
2021-02-20 19:44:54 +01:00
|
|
|
#source $HOME/.cargo/env
|
|
|
|
#export PATH=$HOME/.cargo/bin:$PATH
|
2020-05-25 13:58:46 +02:00
|
|
|
|
|
|
|
until false
|
|
|
|
do
|
2021-07-25 08:20:35 +02:00
|
|
|
# patch code for FreeBSD
|
|
|
|
if grep XBS5 "$HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/sysconf-0.3.4/src/raw.rs" ; then
|
|
|
|
echo patching sysconf
|
|
|
|
grep -v XBS5 /elements/.cargo/registry/src/github.com-1ecc6299db9ec823/sysconf-0.3.4/src/raw.rs > /tmp/foo && \
|
|
|
|
mv /tmp/foo /elements/.cargo/registry/src/github.com-1ecc6299db9ec823/sysconf-0.3.4/src/raw.rs
|
|
|
|
fi
|
|
|
|
|
2020-05-25 13:58:46 +02:00
|
|
|
cargo run \
|
|
|
|
--release \
|
|
|
|
--bin electrs \
|
|
|
|
-- \
|
|
|
|
-vvvv \
|
|
|
|
--address-search \
|
2021-03-03 13:29:18 +01:00
|
|
|
--cors '*' \
|
2021-02-04 07:53:08 +01:00
|
|
|
--db-dir /electrs \
|
2021-02-04 04:17:28 +01:00
|
|
|
--daemon-dir $HOME \
|
2020-05-25 13:58:46 +02:00
|
|
|
--http-addr '[::]:3000' \
|
|
|
|
--cookie 'user:pass' \
|
2021-02-04 04:17:28 +01:00
|
|
|
--precache-scripts $HOME/electrs/contrib/popular-scripts.txt
|
|
|
|
|
|
|
|
sleep 3
|
2020-05-25 13:58:46 +02:00
|
|
|
done
|