39 lines
1.1 KiB
Bash
39 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
source /scripts/init_node_vars
|
|
source /scripts/functions/check_pool_registration
|
|
|
|
# Check for required files
|
|
if [ ! -f "${NODE_PATH}/staking/pool-keys/kes.skey" ]; then
|
|
echo "Missing required pool-keys/kes.skey."
|
|
MISSING_FILES=1
|
|
fi
|
|
|
|
if [ ! -f "${NODE_PATH}/staking/pool-keys/vrf.skey" ]; then
|
|
echo "Missing required pool-keys/vrf.skey."
|
|
MISSING_FILES=1
|
|
fi
|
|
|
|
if [ ! -f "${NODE_PATH}/staking/pool-keys/node.cert" ]; then
|
|
echo "Missing required pool-keys/node.cert."
|
|
MISSING_FILES=1
|
|
fi
|
|
|
|
if [ ! -f "${NODE_PATH}/staking/POOL_ID" ]; then
|
|
echo "Missing required POOL_ID."
|
|
MISSING_FILES=1
|
|
fi
|
|
|
|
if [ -n "$MISSING_FILES" ]; then
|
|
echo "You are missing required files to start."
|
|
echo "You need to initialize the stake pool keys, addresses and certificates and submit them to the blockchain first."
|
|
echo "You can do that by running \`create_stakepool\`"
|
|
read
|
|
|
|
exit
|
|
else
|
|
tmux \
|
|
new-session "source /scripts/functions/run_stakingnode; run_stakingnode" \; \
|
|
split-window "source /scripts/functions/status; status" \; \
|
|
select-layout even-horizontal
|
|
fi |