este script pode funcionar com alguns ajustes com sua necessidade
#! /bin/bash
id_of_software=$(pidof <software name>)
if [[ -n $id_of_software ]]
then
echo "it is running" + $id_of_software
run your script
else
echo "not running"
do something
fi