diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-heat')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-heat/heat.init | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-heat/heat.init b/meta-openstack/recipes-devtools/python/python-heat/heat.init index 4d8c180..5e0719f 100644 --- a/meta-openstack/recipes-devtools/python/python-heat/heat.init +++ b/meta-openstack/recipes-devtools/python/python-heat/heat.init | |||
| @@ -76,6 +76,25 @@ status() | |||
| 76 | echo "$DESC is not running" | 76 | echo "$DESC is not running" |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | reset() | ||
| 80 | { | ||
| 81 | stop | ||
| 82 | |||
| 83 | # This is to make sure postgres is configured and running | ||
| 84 | if ! pidof postmaster > /dev/null; then | ||
| 85 | /etc/init.d/postgresql-init | ||
| 86 | /etc/init.d/postgresql start | ||
| 87 | sleep 2 | ||
| 88 | fi | ||
| 89 | |||
| 90 | [ ! -d /var/log/heat ] && mkdir /var/log/heat | ||
| 91 | sudo -u postgres dropdb heat | ||
| 92 | sudo -u postgres createdb heat | ||
| 93 | heat-manage db_sync | ||
| 94 | |||
| 95 | start | ||
| 96 | } | ||
| 97 | |||
| 79 | case "$1" in | 98 | case "$1" in |
| 80 | start) | 99 | start) |
| 81 | start | 100 | start |
| @@ -90,8 +109,11 @@ case "$1" in | |||
| 90 | status) | 109 | status) |
| 91 | status | 110 | status |
| 92 | ;; | 111 | ;; |
| 112 | reset) | ||
| 113 | reset | ||
| 114 | ;; | ||
| 93 | *) | 115 | *) |
| 94 | echo "Usage: $0 {start|stop|force-reload|restart|reload|status}" | 116 | echo "Usage: $0 {start|stop|force-reload|restart|reload|status|reset}" |
| 95 | exit 1 | 117 | exit 1 |
| 96 | ;; | 118 | ;; |
| 97 | esac | 119 | esac |
