~charmers/charms/precise/openerp-server/trunk

« back to all changes in this revision

Viewing changes to hooks/stop

  • Committer: Patrick Hetu
  • Date: 2012-03-20 14:16:33 UTC
  • Revision ID: patrick.hetu@gmail.com-20120320141633-zaesdiwtpauj3esm
fix start, stop hooks

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
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
 
2
 
 
3
set -eu # -x for verbose logging to juju debug-log
 
4
 
 
5
 
 
6
if [[ $ORIGIN == lp ]]; then
 
7
 
 
8
  stop openerp-server
 
9
 
 
10
else
 
11
 
 
12
  invoke-rc.d openerp-server stop
 
13
 
 
14
fi
 
15