HiveOS support

This commit is contained in:
Haifa Bogdan Adnan 2019-08-28 00:56:55 +03:00
parent 2a62844fe8
commit 370cf7487b
5 changed files with 147 additions and 0 deletions

20
hiveos/h-run.sh Executable file
View file

@ -0,0 +1,20 @@
#!/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