REDACTED-rig/hiveos/h-run.sh
Haifa Bogdan Adnan 370cf7487b HiveOS support
2019-08-28 00:56:55 +03:00

20 lines
538 B
Bash
Executable file

#!/usr/bin/env bash
. h-manifest.conf
CUSTOM_API_PORT=`./parse-api-port.sh`
#try to release TIME_WAIT sockets
while true; do
for con in `netstat -anp | grep TIME_WAIT | grep ${CUSTOM_API_PORT} | awk '{print $5}'`; do
killcx $con lo
done
netstat -anp | grep TIME_WAIT | grep ${CUSTOM_API_PORT} &&
continue ||
break
done
mkdir -p $CUSTOM_LOG_FOLDER
echo -e "Running ${CYAN}iximiner${NOCOLOR}" | tee ${CUSTOM_LOG_FOLDER}/${CUSTOM_NAME}.log
./ninjarig $(< $CUSTOM_NAME.conf)$@ 2>&1 | tee ${CUSTOM_LOG_FOLDER}/${CUSTOM_NAME}.log