linux check if screen is running

C++
if ! screen -list | grep -q "myscreen"; then
    # run bash script
fi

Source

Also in C++: