Guest User

Untitled

a guest
Apr 25th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "Stoping NOC, please wait..."
  4. /etc/init.d/noc-launcher stop
  5.  
  6. sleep 10
  7.  
  8. echo "
  9.  
  10. Cleaning all events and alarms, please wait..."
  11. mongo --shell noc << _EOF_
  12. db.noc.events.active.remove({});
  13. db.noc.events.new.remove({});
  14. db.noc.events.archive.remove({});
  15. db.noc.alarms.active.remove({});
  16. db.noc.aalrms.archive.remove({});
  17. quit()
  18. _EOF_
  19.  
  20. echo "
  21.  
  22. Starting NOC, please wait..."
  23. sleep 10
  24.  
  25. /etc/init.d/noc-launcher start
  26.  
  27. exit 0
Advertisement
Add Comment
Please, Sign In to add comment