Root/cgminer/files/cgminer-monitor

Source at commit 8b7a89168c777ee394adff8070b29581ebf46ba8 created 7 years 1 month ago.
By Xiangfu, cgmienr: add a webui, update to 2.10.5
1#!/bin/sh
2# This file is for cron job
3
4C=`pidof cgminer | wc -w`
5if [ "$C" != "1" ]; then
6    /etc/init.d/cgminer stop
7    /etc/init.d/cgminer start
8    exit 0;
9fi
10
11A=`cat /tmp/cm.log`
12B=`cgminer-api | grep "^ \[Accepted\]"`
13cgminer-api | grep "^ \[Accepted\]" > /tmp/cm.log
14if [ "$A" == "$B" ]; then
15    /etc/init.d/cgminer stop
16    /etc/init.d/cgminer start
17    exit 0;
18fi
19

Archive Download this file



interactive