mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 09:27:25 +00:00
stratum: skip screen instances if there is no .conf
This commit is contained in:
parent
11c8d5b767
commit
ff136d53af
3 changed files with 12 additions and 9 deletions
2
rc.local
2
rc.local
|
@ -17,7 +17,7 @@ screen -dmS loop2 $WEB_DIR/loop2.sh
|
||||||
screen -dmS blocks $WEB_DIR/blocks.sh
|
screen -dmS blocks $WEB_DIR/blocks.sh
|
||||||
screen -dmS debug tail -f $LOG_DIR/debug.log
|
screen -dmS debug tail -f $LOG_DIR/debug.log
|
||||||
|
|
||||||
# Stratum ports
|
# Stratum instances (skipped/exit if no .conf)
|
||||||
|
|
||||||
screen -dmS c11 $STRATUM_DIR/run.sh c11
|
screen -dmS c11 $STRATUM_DIR/run.sh c11
|
||||||
screen -dmS x11 $STRATUM_DIR/run.sh x11
|
screen -dmS x11 $STRATUM_DIR/run.sh x11
|
||||||
|
|
|
@ -4,7 +4,7 @@ ulimit -n 10240
|
||||||
ulimit -u 10240
|
ulimit -u 10240
|
||||||
|
|
||||||
cd /var/stratum
|
cd /var/stratum
|
||||||
while true; do
|
while [ -e config/${1}.conf ]; do
|
||||||
gzip -f config/${1}.log
|
gzip -f config/${1}.log
|
||||||
./stratum config/$1
|
./stratum config/$1
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
|
@ -312,14 +312,17 @@ void *monitor_thread(void *p)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_max_shares > 0 && g_shares_counter > g_max_shares) {
|
if(g_max_shares && g_shares_counter) {
|
||||||
g_exiting = true;
|
|
||||||
stratumlog("%s need a restart, exiting...\n", g_current_algo->name);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if((g_shares_counter % 10000u) == 0) {
|
if((g_shares_counter % 5000u) == 0) {
|
||||||
stratumlog("%s %luK shares...\n", g_current_algo->name, (unsigned long) (g_shares_counter/10000u));
|
stratumlog("%s %luK shares...\n", g_current_algo->name, (g_shares_counter/10000u));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(g_shares_counter > g_max_shares) {
|
||||||
|
g_exiting = true;
|
||||||
|
stratumlog("%s need a restart (%lu shares), exiting...\n", g_current_algo->name, g_max_shares);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue