clean.sh 350 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. set -e
  3. DIR="$( cd "$( dirname "$0" )" && pwd )"
  4. # Ensure that the servers are stopped.
  5. $DIR/stop.sh
  6. PID_FILE="$DIR/servers.pid"
  7. if [ -f "$PID_FILE" ]; then
  8. echo "servers.pid exists!"
  9. exit 1
  10. fi
  11. for port in 8080 8081 8082; do
  12. rm -rf "${DIR:?}/$port"
  13. rm -rf "$DIR/media_store.$port"
  14. done
  15. rm -rf "${DIR:?}/etc"