raspberryPi 3

testing for a running program in a shell script

Used this to solve a problem for Ben where he needed a script to run on first log in for a user but not to run again if it was already running and they opened another sheel


if ! pgrep -f "dmx-hue" >/dev/null
then
echo "didn't find dmx"
else
echo "found dmx"
fi