setup.sh can now be more picky about the kind of config it creates

This commit is contained in:
Michael Vines
2018-07-02 08:08:14 -07:00
committed by Grimes
parent c0f9e452f2
commit 5716898216
4 changed files with 65 additions and 19 deletions

View File

@@ -12,17 +12,19 @@ fi
ip_address_arg=-p # Use public IP address (TODO: make this configurable?)
num_tokens="$(snapctl get num-tokens)"
$SNAP/bin/setup.sh ${num_tokens:+-n $num_tokens} ${ip_address_arg}
case $mode in
leader+drone)
$SNAP/bin/setup.sh ${num_tokens:+-n $num_tokens} ${ip_address_arg} -t leader
snapctl start --enable solana.daemon-leader
snapctl start --enable solana.daemon-drone
;;
leader)
$SNAP/bin/setup.sh ${num_tokens:+-n $num_tokens} ${ip_address_arg} -t leader
snapctl start --enable solana.daemon-leader
;;
validator)
$SNAP/bin/setup.sh ${ip_address_arg} -t validator
snapctl start --enable solana.daemon-validator
;;
*)