mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-01 21:02:27 +02:00
19 lines
363 B
Bash
Executable File
19 lines
363 B
Bash
Executable File
#!/bin/sh
|
|
# This file is for cron job
|
|
|
|
C=`pidof cgminer | wc -w`
|
|
if [ "$C" != "1" ]; then
|
|
/etc/init.d/cgminer stop
|
|
/etc/init.d/cgminer start
|
|
exit 0;
|
|
fi
|
|
|
|
A=`cat /tmp/cm.log`
|
|
B=`cgminer-api | grep "^ \[Accepted\]"`
|
|
cgminer-api | grep "^ \[Accepted\]" > /tmp/cm.log
|
|
if [ "$A" == "$B" ]; then
|
|
/etc/init.d/cgminer stop
|
|
/etc/init.d/cgminer start
|
|
exit 0;
|
|
fi
|