apolloapi-v2/backend/apollo-miner/miner_start.sh
jstefanop e99c9ccb28 Update miner_start.sh
fix issue where old corrupt log files cause webui to not display properly
2022-07-15 13:54:35 -04:00

35 lines
589 B
Bash
Executable File

#!/bin/bash
cd /opt/apolloapi/backend/apollo-miner
settings=$(cat miner_config)
start_hashboards()
{
while [ $1 ];
do
screen -dmS miner ./futurebit-miner -comport $1 -ao_mode 1 $settings
sleep 1
shift
done
}
#clear old log files
rm apollo-miner.*
#reset internal hashboard
gpio write 0 0
sleep .5
gpio write 0 1
sleep 30
#start internal hashboard
screen -dmS miner ./futurebit-miner -comport /dev/ttyS1 -ao_mode 1 $settings
#find and start external hashboards
ports=$(ls /dev/ttyACM*)
start_hashboards $ports
echo "Started"