stop 278 B

1234567891011121314151617
  1. #!/bin/bash
  2. ps waux | grep node | grep -v grep
  3. echo "stopping ..."
  4. if [ "$(id -u)" != "0" ]; then
  5. sudo forever stopall
  6. fi
  7. forever stopall
  8. sleep 3
  9. ps waux | grep node | grep -v grep
  10. sleep 1
  11. cp log.txt log-$(date +%s).txt
  12. cd etherpad-lite/node
  13. cp log.txt log-$(date +%s).txt