Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script to choose your garlicoin mining pool, with logging.
#!/bin/bash
# Script to choose your garlicoin mining pool, with logging.
# If you find it useful, I'm accepting some garlic at: GNHARsNxMKqXH8xNmSR9cc8RJqDNfKgMvj
# Thanks.
# On Linux:
# Put the spript anywhere.
# Run as any other spript (using the terminal).
# On Windows:
# Requires bash on Windows, download Git for Windows, https://git-scm.com/downloads (just install with default options).
# Put the spript outside the 'ccminer-x64-2.2.4-cuda9' directory or change the command below.
# Run using Git Bash (double click should work).
os="$(uname -s)"
if [ "$os" == "Linux" ]; then
ccminer="ccminer" # ccminer command on Linux (change if necessary)
else
ccminer="ccminer-x64-2.2.4-cuda9\ccminer-x64.exe" # ccminer command on Windows (change if necessary)
fi
# Adjust miner arguments here.
ccminer_args="--algo=scrypt:10"
# Create logs?
create_logs="true"
declare -A pools
# http://pools.garlicoin.fun/
# Set the address for each pool and add more pools...
# You can use different addresses to keep track of the earnings.
pools["stratum+tcp://us.pool.garlicsoup.xyz:3333"]=Gxxxxxx__YOUR_ADDRESS_HERE__xxxxxx
pools["stratum+tcp://pool.grlc-bakery.fun:3333"]=Gxxxxxx__YOUR_ADDRESS_HERE__xxxxxx
#pools["stratum+tcp://grow.garlicpool.com:3333"]=Gxxxxxx__YOUR_ADDRESS_HERE__xxxxxx
#pools["stratum+tcp://pool.garlic.lol:3333"]=Gxxxxxx__YOUR_ADDRESS_HERE__xxxxxx
pools["stratum+tcp://freshgarlicblocks.net:3032"]=Gxxxxxx__YOUR_ADDRESS_HERE__xxxxxx
pools["stratum+tcp://butterpool.com:3032"]=Gxxxxxx__YOUR_ADDRESS_HERE__xxxxxx
# Stop editing.
if [ "$create_logs" == "true" ]; then
logdir="logs_$os"
mkdir -p "$logdir"
fi
PS3='Select pool: '
select o in "${!pools[@]}"; do
if [ -n "$o" ]; then
u=${pools[$o]}
echo
echo "o = $o"
echo "u = $u"
echo
if [ "$create_logs" == "true" ] && [[ "$o" =~ tcp:\/\/(.+): ]]; then
logfile="$logdir/${BASH_REMATCH[1]}_$(date +%s).log"
echo "logfile = $logfile"
echo
$ccminer $ccminer_args -o "$o" -u "$u" | tee "$logfile"
else
echo "NOT SAVING LOG"
echo
$ccminer $ccminer_args -o "$o" -u "$u"
fi
exit
else
echo "invalid option"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.