1: #!/usr/bin/env bash 2: RUNNING=$(pgrep -cf "\\./run") 3: 4: if [[ $RUNNING -eq 0 ]] 5: then 6: cd ~/System/Tests || exit 1 7: ./run 8: else 9: echo "Already running" 10: fi