2012-03-19 09:59:39 +02:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
START=99
|
|
|
|
|
2012-05-11 06:21:50 +03:00
|
|
|
POOL1="-o http://us.ozco.in:8331 -O xiangfu.0:x"
|
|
|
|
POOL2="-o http://pool.ABCPool.co:8332 -O xiangfu.0:x"
|
|
|
|
POOL3="-o http://pit.deepbit.net:8332 -O xiangfu.z@gmail.com_0:x"
|
2012-05-04 04:26:32 +03:00
|
|
|
|
|
|
|
POOLS="$POOL1 $POOL2 $POOL3"
|
|
|
|
|
2012-03-19 09:59:39 +02:00
|
|
|
start() {
|
2012-05-04 04:26:32 +03:00
|
|
|
DEVS=`find /dev/ -type c -name "ttyUSB*" | sed 's/^/-S/' | sed ':a;N;$!ba;s/\n/ /g'`
|
2013-01-17 17:05:58 +02:00
|
|
|
ntpd -d -n -q -N -p 0.openwrt.pool.ntp.org \
|
|
|
|
-p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org && \
|
2012-12-31 02:34:09 +02:00
|
|
|
cgminer -q --api-allow "W:0/0" --api-listen $POOLS $DEVS &
|
2012-03-19 09:59:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
killall -s 9 cgminer
|
|
|
|
}
|