I took a stab at updating 1bash for the new switcher. Instead of writing a bunch of small files, a heredoc with the necessary JSON is written, and then the switcher is started with that JSON file. The following patch should work:
--- 1bash.orig 2017-07-20 05:26:02.000000000 -0700
+++ 1bash 2017-07-23 20:50:43.995192600 -0700
@@ -1021,79 +1021,92 @@
echo ""
fi
-rm /home/m1/currency
-rm /home/m1/pwrcost
-rm /home/m1/minprofit
-rm /home/m1/paymentaddr
-rm /home/m1/minername
-rm /home/m1/f
-rm /home/m1/g
-rm /home/m1/h
-#rm /home/m1/ii
-rm /home/m1/j
-rm /home/m1/k
-rm /home/m1/l
-#rm /home/m1/m
-rm /home/m1/n
-rm /home/m1/o
-rm /home/m1/p
-#rm /home/m1/q
-rm /home/m1/r
-rm /home/m1/s
-rm /home/m1/t
-#rm /home/m1/u
-rm /home/m1/v
-rm /home/m1/ww
-rm /home/m1/x
-#rm /home/m1/y
-#rm /home/m1/z
-#rm /home/m1/za
-#rm /home/m1/zb
-#rm /home/m1/zc
sleep 2
cd /home/m1
-echo $CURRENCY > '/home/m1/currency'
-echo $POWER_COST > '/home/m1/pwrcost'
-echo $MINIMUM_PROFIT > '/home/m1/minprofit'
-echo $PAYMENT_ADDRESS > '/home/m1/paymentaddr'
-echo $WORKER_NAME > '/home/m1/minername'
-
-echo $daggerhashimoto_POWERLIMIT_WATTS > '/home/m1/f'
-echo $__daggerhashimoto_CORE_OVERCLOCK > '/home/m1/g'
-echo $daggerhashimoto_MEMORY_OVERCLOCK > '/home/m1/h'
-#echo $_______daggerhashimoto_FAN_SPEED > '/home/m1/ii'
-
-echo $equihash_POWERLIMIT_WATTS > '/home/m1/j'
-echo $__equihash_CORE_OVERCLOCK > '/home/m1/k'
-echo $equihash_MEMORY_OVERCLOCK > '/home/m1/l'
-#echo $_______equihash_FAN_SPEED > '/home/m1/m'
-
-echo $neoscrypt_POWERLIMIT_WATTS > '/home/m1/n'
-echo $__neoscrypt_CORE_OVERCLOCK > '/home/m1/o'
-echo $neoscrypt_MEMORY_OVERCLOCK > '/home/m1/p'
-#echo $_______neoscrypt_FAN_SPEED > '/home/m1/q'
-
-echo $lyra2rev2_POWERLIMIT_WATTS > '/home/m1/r'
-echo $__lyra2rev2_CORE_OVERCLOCK > '/home/m1/s'
-echo $lyra2rev2_MEMORY_OVERCLOCK > '/home/m1/t'
-#echo $_______lyra2rev2_FAN_SPEED > '/home/m1/u'
-
-echo $lbry_POWERLIMIT_WATTS > '/home/m1/v'
-echo $__lbry_CORE_OVERCLOCK > '/home/m1/ww'
-echo $lbry_MEMORY_OVERCLOCK > '/home/m1/x'
-#echo $_______lbry_FAN_SPEED > '/home/m1/y'
-
-#echo $pascal_POWERLIMIT_WATTS > '/home/m1/z'
-#echo $__pascal_CORE_OVERCLOCK > '/home/m1/za'
-#echo $pascal_MEMORY_OVERCLOCK > '/home/m1/zb'
-#echo $_______pascal_FAN_SPEED > '/home/m1/zc'
+if [ "$INDIVIDUAL_CLOCKS" == "YES" ]
+then
+ gpu_clks_daggerhashimoto="[$__CORE_OVERCLOCK_0,$__CORE_OVERCLOCK_1,$__CORE_OVERCLOCK_2,$__CORE_OVERCLOCK_3,$__CORE_OVERCLOCK_4,$__CORE_OVERCLOCK_5,$__CORE_OVERCLOCK_6,$__CORE_OVERCLOCK_7,$__CORE_OVERCLOCK_8,$__CORE_OVERCLOCK_9,$__CORE_OVERCLOCK_10,$__CORE_OVERCLOCK_11,$__CORE_OVERCLOCK_12,$__CORE_OVERCLOCK_13]"
+ mem_clks_daggerhashimoto="[$MEMORY_OVERCLOCK_0,$MEMORY_OVERCLOCK_1,$MEMORY_OVERCLOCK_2,$MEMORY_OVERCLOCK_3,$MEMORY_OVERCLOCK_4,$MEMORY_OVERCLOCK_5,$MEMORY_OVERCLOCK_6,$MEMORY_OVERCLOCK_7,$MEMORY_OVERCLOCK_8,$MEMORY_OVERCLOCK_9,$MEMORY_OVERCLOCK_10,$MEMORY_OVERCLOCK_11,$MEMORY_OVERCLOCK_12,$MEMORY_OVERCLOCK_13]"
+ gpu_clks_equihash=$gpu_clks_daggerhashimoto
+ mem_clks_equihash=$mem_clks_daggerhashimoto
+ gpu_clks_neoscrypt=$gpu_clks_daggerhashimoto
+ mem_clks_neoscrypt=$mem_clks_daggerhashimoto
+ gpu_clks_lyra2rev2=$gpu_clks_daggerhashimoto
+ mem_clks_lyra2rev2=$mem_clks_daggerhashimoto
+ gpu_clks_lbry=$gpu_clks_daggerhashimoto
+ mem_clks_lbry=$mem_clks_daggerhashimoto
+else
+ gpu_clks_daggerhashimoto="$__daggerhashimoto_CORE_OVERCLOCK"
+ mem_clks_daggerhashimoto="$daggerhashimoto_MEMORY_OVERCLOCK"
+ gpu_clks_equihash="$__equihash_CORE_OVERCLOCK"
+ mem_clks_equihash="$equihash_MEMORY_OVERCLOCK"
+ gpu_clks_neoscrypt="$__neoscrypt_CORE_OVERCLOCK"
+ mem_clks_neoscrypt="$neoscrypt_MEMORY_OVERCLOCK"
+ gpu_clks_lyra2rev2="$__lyra2rev2_CORE_OVERCLOCK"
+ mem_clks_lyra2rev2="$lyra2rev2_MEMORY_OVERCLOCK"
+ gpu_clks_lbry="$__lbry_CORE_OVERCLOCK"
+ mem_clks_lbry="$lbry_MEMORY_OVERCLOCK"
+fi
+
+if [ "$INDIVIDUAL_POWERLIMIT" == "YES" ]
+then
+ pwr_lim_daggerhashimoto="[$INDIVIDUAL_POWERLIMIT_0,$INDIVIDUAL_POWERLIMIT_1,$INDIVIDUAL_POWERLIMIT_2,$INDIVIDUAL_POWERLIMIT_3,$INDIVIDUAL_POWERLIMIT_4,$INDIVIDUAL_POWERLIMIT_5,$INDIVIDUAL_POWERLIMIT_6,$INDIVIDUAL_POWERLIMIT_7,$INDIVIDUAL_POWERLIMIT_8,$INDIVIDUAL_POWERLIMIT_9,$INDIVIDUAL_POWERLIMIT_10,$INDIVIDUAL_POWERLIMIT_11,$INDIVIDUAL_POWERLIMIT_12,$INDIVIDUAL_POWERLIMIT_13]"
+ pwr_lim_equihash=$pwr_lim_daggerhashimoto
+ pwr_lim_neoscrypt=$pwr_lim_daggerhashimoto
+ pwr_lim_lyra2rev2=$pwr_lim_daggerhashimoto
+ pwr_lim_lbry=$pwr_lim_daggerhashimoto
+else
+ pwr_lim_daggerhashimoto=$daggerhashimoto_POWERLIMIT_WATTS
+ pwr_lim_equihash=$equihash_POWERLIMIT_WATTS
+ pwr_lim_neoscrypt=$neoscrypt_POWERLIMIT_WATTS
+ pwr_lim_lyra2rev2=$lyra2rev2_POWERLIMIT_WATTS
+ pwr_lim_lbry=$lbry_POWERLIMIT_WATTS
+fi
+
+cat </home/m1/1bash_conf.json
+{
+ "currency": "$CURRENCY",
+ "pwrcost": $POWER_COST,
+ "min_profit": $MINIMUM_PROFIT,
+ "payment_addr": "$PAYMENT_ADDR",
+ "miner_name": "$WORKER_NAME",
+ "performance":
+ {
+ "daggerhashimoto": {
+ "speed": 0.087, "power": 0.397,
+ "power_limit": $pwr_lim_daggerhashimoto, "gpu_oc": $gpu_clks_daggerhashimoto, "mem_oc": $mem_clks_daggerhashimoto, "fan": 0,
+ "cmd": "/home/m1/eth/Genoil-U/ethminer -SP 2 -S daggerhashimoto.usa.nicehash.com:3353 -O {ADDR}.{MINER}:x -U"
+ },
+ "equihash": {
+ "speed": 0.000001140, "power": 0.397,
+ "power_limit": $pwr_lim_equihash, "gpu_oc": $gpu_clks_equihash, "mem_oc": $mem_clks_equihash, "fan": 0,
+ "cmd": "/home/m1/zec/v3_4/miner --eexit 3 --fee 0 --pec --server equihash.usa.nicehash.com --user {ADDR}.{MINER} --pass z --port 3357"
+ },
+ "neoscrypt": {
+ "speed": 0.002160, "power": 0.397,
+ "power_limit": $pwr_lim_neoscrypt, "gpu_oc": $gpu_clks_neoscrypt, "mem_oc": $mem_clks_neoscrypt, "fan": 0,
+ "cmd": "/home/m1/SPccminer/ccminer -a neoscrypt -o stratum+tcp://neoscrypt.usa.nicehash.com:3341 -u {ADDR}.{MINER} -p x"
+ },
+ "lyra2rev2": {
+ "speed": 0.081, "power": 0.386,
+ "power_limit": $pwr_lim_lyra2rev2, "gpu_oc": $gpu_clks_lyra2rev2, "mem_oc": $mem_clks_lyra2rev2, "fan": 0,
+ "cmd": "/home/m1/SPccminer/ccminer -a lyra2v2 -o stratum+tcp://lyra2rev2.usa.nicehash.com:3347 -u {ADDR}.{MINER} -p x"
+ },
+ "lbry": {
+ "speed": 0.639, "power": 0.392,
+ "power_limit": $pwr_lim_lbry, "gpu_oc": $gpu_clks_lbry, "mem_oc": $mem_clks_lbry, "fan": 0,
+ "cmd": "/home/m1/SPccminer/ccminer -a lbry -o stratum+tcp://lbry.usa.nicehash.com:3356 -u {ADDR}.{MINER} -p x"
+ }
+ }
+}
+EOF
echo "LAUNCHING: SALFTER_NICEHASH_PROFIT_SWITCHING "
echo ""
-python2.7 '/home/m1/switch'
+python2.7 '/home/m1/switch' /home/m1/1bash_conf.json
if [ $LOCALorREMOTE == "LOCAL" ]
then