~lazypower/charms/trusty/mongodb/fixing_st00f

« back to all changes in this revision

Viewing changes to hooks/stop

  • Committer: Juan L. Negron
  • Date: 2011-08-11 05:36:24 UTC
  • Revision ID: juan.negron@canonical.com-20110811053624-4r9dn81ytjqk91g9
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# This will be run when the service is being torn down, allowing you to disable
 
3
# it in various ways..
 
4
# For example, if your web app uses a text file to signal to the load balancer
 
5
# that it is live... you could remove it and sleep for a bit to allow the load
 
6
# balancer to stop sending traffic.
 
7
# rm /srv/webroot/server-live.txt && sleep 30
 
8
 
 
9
service mongodb stop
 
10
rm -f /var/lib/mongodb/mongod.lock