testnet-laconicd-stack/stack-orchestrator/config/laconic-faucet/start-faucet.sh

22 lines
420 B
Bash

#!/bin/bash
set -e
set -u
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
toml_file="./environments/local.toml"
# Set faucet key from env
faucet_key=${CERC_FAUCET_KEY}
echo "The faucet key is $faucet_key"
# Update the faucetKey in local.toml
sed -i "s/faucetKey = \"\"/faucetKey = \"$faucet_key\"/" "$toml_file"
echo "Updated faucetKey in local.toml"
# Start node-js server
yarn start-faucet
echo "Started faucet"