eth-statediff-service/startup_script.sh

21 lines
637 B
Bash
Raw Permalink Normal View History

2020-08-19 20:30:52 +00:00
#!/bin/sh
# Exit if the variable tests fail
set -e
set +x
# Check the database variables are set
test "$VDB_COMMAND"
2020-08-19 20:30:52 +00:00
set +e
# docker must be run in privilaged mode for mounts to work
echo "Setting up /app/geth-rw overlayed /app/geth-ro"
mkdir -p /tmp/overlay && \
sudo mount -t tmpfs tmpfs /tmp/overlay && \
mkdir -p /tmp/overlay/upper && \
mkdir -p /tmp/overlay/work && \
mkdir -p /app/geth-rw && \
sudo mount -t overlay overlay -o lowerdir=/app/geth-ro,upperdir=/tmp/overlay/upper,workdir=/tmp/overlay/work /app/geth-rw && \
echo "Running the statediff service" && \
2021-10-21 19:07:19 +00:00
sudo ./eth-statediff-service "$VDB_COMMAND" --config=config.toml