I myself have just recently started playing with monit, for a very
similar scenario. My suggestion would that you replace "process foo"
with "process foo0" and foo1. This parameter doesn't have to have the
same name as the program you are checking, but rather a unique
identifier of the monitoring instance.
However, I believe you also need to pass foo0.pid or foo1.pid as an
argument to cccstop.sh and cccstate.sh, in order for the scripts to stop
the correct instance and write to the correct pidfile, respectively.