root / ganeti / snf-ganeti-hook @ a4d2780c
History | View | Annotate | Download (1.8 kB)
1 | 0bb376ce | Vangelis Koukis | #!/bin/bash |
---|---|---|---|
2 | 0bb376ce | Vangelis Koukis | # |
3 | 0bb376ce | Vangelis Koukis | # Copyright 2011 GRNET S.A. All rights reserved. |
4 | 0bb376ce | Vangelis Koukis | # |
5 | 0bb376ce | Vangelis Koukis | # Redistribution and use in source and binary forms, with or |
6 | 0bb376ce | Vangelis Koukis | # without modification, are permitted provided that the following |
7 | 0bb376ce | Vangelis Koukis | # conditions are met: |
8 | 0bb376ce | Vangelis Koukis | # |
9 | 0bb376ce | Vangelis Koukis | # 1. Redistributions of source code must retain the above |
10 | 0bb376ce | Vangelis Koukis | # copyright notice, this list of conditions and the following |
11 | 0bb376ce | Vangelis Koukis | # disclaimer. |
12 | 0bb376ce | Vangelis Koukis | # |
13 | 0bb376ce | Vangelis Koukis | # 2. Redistributions in binary form must reproduce the above |
14 | 0bb376ce | Vangelis Koukis | # copyright notice, this list of conditions and the following |
15 | 0bb376ce | Vangelis Koukis | # disclaimer in the documentation and/or other materials |
16 | 0bb376ce | Vangelis Koukis | # provided with the distribution. |
17 | 0bb376ce | Vangelis Koukis | # |
18 | 0bb376ce | Vangelis Koukis | # THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS |
19 | 0bb376ce | Vangelis Koukis | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
20 | 0bb376ce | Vangelis Koukis | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
21 | 0bb376ce | Vangelis Koukis | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR |
22 | 0bb376ce | Vangelis Koukis | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 | 0bb376ce | Vangelis Koukis | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 | 0bb376ce | Vangelis Koukis | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
25 | 0bb376ce | Vangelis Koukis | # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
26 | 0bb376ce | Vangelis Koukis | # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
27 | 0bb376ce | Vangelis Koukis | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
28 | 0bb376ce | Vangelis Koukis | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | 0bb376ce | Vangelis Koukis | # POSSIBILITY OF SUCH DAMAGE. |
30 | 0bb376ce | Vangelis Koukis | # |
31 | 0bb376ce | Vangelis Koukis | # The views and conclusions contained in the software and |
32 | 0bb376ce | Vangelis Koukis | # documentation are those of the authors and should not be |
33 | 0bb376ce | Vangelis Koukis | # interpreted as representing official policies, either expressed |
34 | 0bb376ce | Vangelis Koukis | # or implied, of GRNET S.A. |
35 | 0bb376ce | Vangelis Koukis | # |
36 | 0bb376ce | Vangelis Koukis | |
37 | 0bb376ce | Vangelis Koukis | # This must be set to the root of the the Django project for Synnefo |
38 | 0bb376ce | Vangelis Koukis | SYNNEFO_PROJECT_DIR=/home/devel/synnefo |
39 | 0bb376ce | Vangelis Koukis | |
40 | 0bb376ce | Vangelis Koukis | # Include the parent of the Django project dir in the PYTHONPATH |
41 | 0bb376ce | Vangelis Koukis | export PYTHONPATH=$PYTHONPATH:$(dirname "$SYNNEFO_PROJECT_DIR") |
42 | 0bb376ce | Vangelis Koukis | |
43 | 0bb376ce | Vangelis Koukis | exec "$SYNNEFO_PROJECT_DIR"/ganeti/snf-ganeti-hook.py |