1 2 3 4 5 6 7 8 9
directory="run/crash-reports" if [ -d $directory ]; then echo "Crash reports detected:" cat $directory/* exit 1 else echo "No crash reports detected" exit 0 fi